From 7c13831f39daf1e3a0a7aca5044604cdb9fea5b9 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Fri, 8 Dec 2017 17:05:58 +0100 Subject: [PATCH] test/vhost: replace remove_vhost_scsi_dev with _target Change-Id: Ibf243d4e9804acda8ee712253722c963bb0120fc Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/390997 Reviewed-by: Jim Harris Tested-by: SPDK Automated Test System --- test/vhost/fiotest/autotest.sh | 12 ++++++------ test/vhost/hotplug/scsi_hotdetach.sh | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/vhost/fiotest/autotest.sh b/test/vhost/fiotest/autotest.sh index f718fa02f..1ec29f708 100755 --- a/test/vhost/fiotest/autotest.sh +++ b/test/vhost/fiotest/autotest.sh @@ -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]} diff --git a/test/vhost/hotplug/scsi_hotdetach.sh b/test/vhost/hotplug/scsi_hotdetach.sh index e1888b951..a4725870b 100755 --- a/test/vhost/hotplug/scsi_hotdetach.sh +++ b/test/vhost/hotplug/scsi_hotdetach.sh @@ -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 $?