test/vhost: replace remove_vhost_scsi_dev with _target
Change-Id: Ibf243d4e9804acda8ee712253722c963bb0120fc Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/390997 Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
0fd9bba256
commit
7c13831f39
@ -178,16 +178,16 @@ for vm_conf in ${vms[@]}; do
|
||||
$rpc_py add_vhost_scsi_lun naa.$disk.${conf[0]} 0 $disk
|
||||
|
||||
echo "INFO: Trying to remove nonexistent device on existing controller"
|
||||
if $rpc_py remove_vhost_scsi_dev naa.$disk.${conf[0]} 1 > /dev/null; then
|
||||
if $rpc_py remove_vhost_scsi_target naa.$disk.${conf[0]} 1 > /dev/null; then
|
||||
echo "ERROR: Removing nonexistent device (1) from controller naa.$disk.${conf[0]} succeeded, but it shouldn't"
|
||||
false
|
||||
fi
|
||||
|
||||
echo "INFO: Trying to remove existing device from a controller"
|
||||
$rpc_py remove_vhost_scsi_dev naa.$disk.${conf[0]} 0
|
||||
$rpc_py remove_vhost_scsi_target naa.$disk.${conf[0]} 0
|
||||
|
||||
echo "INFO: Trying to remove a just-deleted device from a controller again"
|
||||
if $rpc_py remove_vhost_scsi_dev naa.$disk.${conf[0]} 0 > /dev/null; then
|
||||
if $rpc_py remove_vhost_scsi_target naa.$disk.${conf[0]} 0 > /dev/null; then
|
||||
echo "ERROR: Removing device 0 from controller naa.$disk.${conf[0]} succeeded, but it shouldn't"
|
||||
false
|
||||
fi
|
||||
@ -204,7 +204,7 @@ for vm_conf in ${vms[@]}; do
|
||||
fi
|
||||
|
||||
echo "INFO: Trying to remove device from nonexistent scsi controller"
|
||||
if $rpc_py remove_vhost_scsi_dev vhost.nonexistent.name 0; then
|
||||
if $rpc_py remove_vhost_scsi_target vhost.nonexistent.name 0; then
|
||||
echo "ERROR: Removing device from nonexistent scsi controller succeeded, but it shouldn't"
|
||||
false
|
||||
fi
|
||||
@ -255,7 +255,7 @@ if [[ $test_type == "spdk_vhost_scsi" ]]; then
|
||||
while IFS=':' read -ra disks; do
|
||||
for disk in "${disks[@]}"; do
|
||||
echo "INFO: Hotdetach test. Trying to remove existing device from a controller naa.$disk.${conf[0]}"
|
||||
$rpc_py remove_vhost_scsi_dev naa.$disk.${conf[0]} 0
|
||||
$rpc_py remove_vhost_scsi_target naa.$disk.${conf[0]} 0
|
||||
|
||||
sleep 0.1
|
||||
|
||||
@ -354,7 +354,7 @@ if ! $no_shutdown; then
|
||||
disk=${disk%%_*}
|
||||
echo "INFO: Removing all vhost devices from controller naa.$disk.${conf[0]}"
|
||||
if [[ "$test_type" == "spdk_vhost_scsi" ]]; then
|
||||
$rpc_py remove_vhost_scsi_dev naa.$disk.${conf[0]} 0
|
||||
$rpc_py remove_vhost_scsi_target naa.$disk.${conf[0]} 0
|
||||
fi
|
||||
|
||||
$rpc_py remove_vhost_controller naa.$disk.${conf[0]}
|
||||
|
@ -144,7 +144,7 @@ function hotdetach_tc1() {
|
||||
$run_fio &
|
||||
last_pid=$!
|
||||
sleep 3
|
||||
$rpc_py remove_vhost_scsi_dev naa.Nvme0n1p4.2 0
|
||||
$rpc_py remove_vhost_scsi_target naa.Nvme0n1p4.2 0
|
||||
set +xe
|
||||
wait $last_pid
|
||||
check_fio_retcode "Hotdetach test case 1: Iteration 1." 1 $?
|
||||
@ -166,7 +166,7 @@ function hotdetach_tc2() {
|
||||
$run_fio &
|
||||
last_pid=$!
|
||||
sleep 3
|
||||
$rpc_py remove_vhost_scsi_dev naa.Nvme0n1p4.2 0
|
||||
$rpc_py remove_vhost_scsi_target naa.Nvme0n1p4.2 0
|
||||
set +xe
|
||||
wait $last_pid
|
||||
check_fio_retcode "Hotdetach test case 2: Iteration 1." 1 $?
|
||||
@ -188,7 +188,7 @@ function hotdetach_tc3() {
|
||||
$run_fio &
|
||||
last_pid=$!
|
||||
sleep 3
|
||||
$rpc_py remove_vhost_scsi_dev naa.Nvme0n1p4.2 0
|
||||
$rpc_py remove_vhost_scsi_target naa.Nvme0n1p4.2 0
|
||||
wait $last_pid
|
||||
check_fio_retcode "Hotdetach test case 3: Iteration 1." 0 $?
|
||||
second_disk=""
|
||||
@ -213,7 +213,7 @@ function hotdetach_tc4() {
|
||||
$run_fio &
|
||||
second_fio_pid=$!
|
||||
sleep 3
|
||||
$rpc_py remove_vhost_scsi_dev naa.Nvme0n1p4.2 0
|
||||
$rpc_py remove_vhost_scsi_target naa.Nvme0n1p4.2 0
|
||||
set +xe
|
||||
wait $first_fio_pid
|
||||
check_fio_retcode "Hotdetach test case 4: Iteration 1." 1 $?
|
||||
|
Loading…
Reference in New Issue
Block a user