test/hotplug: Use malloc as second bdev instead of nvme in hotremove tests

In test soft hotremove is used.
For easier testing use only one nvme bdev instead of two.

Change-Id: Ia5543f0ae0773e38b92cc4d2325da2e3d787f674
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446528
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Pawel Kaminski 2019-02-28 09:16:36 -05:00 committed by Jim Harris
parent b0b3d23270
commit b05645c196
3 changed files with 14 additions and 13 deletions

View File

@ -58,9 +58,9 @@ function blk_hotremove_tc2() {
echo "Blk hotremove test case 2" echo "Blk hotremove test case 2"
# 1. Use rpc command to create blk controllers. # 1. Use rpc command to create blk controllers.
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p0.0 HotInNvme0n1p0 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p0.0 HotInNvme0n1p0
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p1.0 Nvme1n1p0 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p1.0 Mallocp0
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p2.1 Nvme1n1p1 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p2.1 Mallocp1
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p3.1 Nvme1n1p2 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p3.1 Mallocp2
# 2. Run two VMs and attach every VM to two blk controllers. # 2. Run two VMs and attach every VM to two blk controllers.
vm_run_with_arg "0 1" vm_run_with_arg "0 1"
vms_prepare "0" vms_prepare "0"
@ -100,9 +100,9 @@ function blk_hotremove_tc3() {
echo "Blk hotremove test case 3" echo "Blk hotremove test case 3"
# 1. Use rpc command to create blk controllers. # 1. Use rpc command to create blk controllers.
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p0.0 HotInNvme1n1p0 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p0.0 HotInNvme1n1p0
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p1.0 Nvme1n1p0 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p1.0 Mallocp0
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p2.1 HotInNvme1n1p1 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p2.1 HotInNvme1n1p1
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p3.1 Nvme1n1p1 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p3.1 Mallocp1
# 2. Run two VMs and attach every VM to two blk controllers. # 2. Run two VMs and attach every VM to two blk controllers.
vm_run_with_arg "0 1" vm_run_with_arg "0 1"
vms_prepare "0 1" vms_prepare "0 1"
@ -142,9 +142,9 @@ function blk_hotremove_tc4() {
echo "Blk hotremove test case 4" echo "Blk hotremove test case 4"
# 1. Use rpc command to create blk controllers. # 1. Use rpc command to create blk controllers.
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p0.0 HotInNvme2n1p0 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p0.0 HotInNvme2n1p0
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p1.0 Nvme1n1p0 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p1.0 Mallocp0
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p2.1 HotInNvme2n1p1 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p2.1 HotInNvme2n1p1
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p3.1 Nvme1n1p1 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p3.1 Mallocp1
# 2. Run two VM, attached to blk controllers. # 2. Run two VM, attached to blk controllers.
vm_run_with_arg "0 1" vm_run_with_arg "0 1"
vms_prepare "0 1" vms_prepare "0 1"
@ -193,9 +193,9 @@ function blk_hotremove_tc5() {
echo "Blk hotremove test case 5" echo "Blk hotremove test case 5"
# 1. Use rpc command to create blk controllers. # 1. Use rpc command to create blk controllers.
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p0.0 HotInNvme3n1p0 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p0.0 HotInNvme3n1p0
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p1.0 Nvme1n1p0 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p1.0 Mallocp0
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p2.1 Nvme1n1p1 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p2.1 Mallocp1
$rpc_py construct_vhost_blk_controller naa.Nvme0n1p3.1 Nvme1n1p2 $rpc_py construct_vhost_blk_controller naa.Nvme0n1p3.1 Mallocp2
# 2. Run two VM, attached to blk controllers. # 2. Run two VM, attached to blk controllers.
vm_run_with_arg "0 1" vm_run_with_arg "0 1"
vms_prepare "0 1" vms_prepare "0 1"

View File

@ -61,7 +61,8 @@ notice ""
spdk_vhost_run spdk_vhost_run
$rpc_py set_bdev_nvme_hotplug -e $rpc_py set_bdev_nvme_hotplug -e
$rpc_py construct_split_vbdev Nvme0n1 16 $rpc_py construct_split_vbdev Nvme0n1 16
$rpc_py construct_split_vbdev Nvme1n1 4 $rpc_py construct_malloc_bdev 128 512 -b Malloc
$rpc_py construct_split_vbdev Malloc 4
$rpc_py construct_split_vbdev HotInNvme0n1 2 $rpc_py construct_split_vbdev HotInNvme0n1 2
$rpc_py construct_split_vbdev HotInNvme1n1 2 $rpc_py construct_split_vbdev HotInNvme1n1 2
$rpc_py construct_split_vbdev HotInNvme2n1 2 $rpc_py construct_split_vbdev HotInNvme2n1 2

View File

@ -53,9 +53,9 @@ function scsi_hotremove_tc2() {
echo "Scsi hotremove test case 2" echo "Scsi hotremove test case 2"
# 1. Attach split NVMe bdevs to scsi controller. # 1. Attach split NVMe bdevs to scsi controller.
$rpc_py add_vhost_scsi_lun naa.Nvme0n1p0.0 0 HotInNvme0n1p0 $rpc_py add_vhost_scsi_lun naa.Nvme0n1p0.0 0 HotInNvme0n1p0
$rpc_py add_vhost_scsi_lun naa.Nvme0n1p1.0 0 Nvme1n1p0 $rpc_py add_vhost_scsi_lun naa.Nvme0n1p1.0 0 Mallocp0
$rpc_py add_vhost_scsi_lun naa.Nvme0n1p2.1 0 HotInNvme0n1p1 $rpc_py add_vhost_scsi_lun naa.Nvme0n1p2.1 0 HotInNvme0n1p1
$rpc_py add_vhost_scsi_lun naa.Nvme0n1p3.1 0 Nvme1n1p1 $rpc_py add_vhost_scsi_lun naa.Nvme0n1p3.1 0 Mallocp1
# 2. Run two VMs, attached to scsi controllers. # 2. Run two VMs, attached to scsi controllers.
vms_setup vms_setup