test/vhost: Add negative test for vhost scsi target removal

Try to delete target from scsi contoller with invalid slot number

Change-Id: Ieac91d64093c3ebc6363bc4f2aef5b7ac86cbe79
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/935
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Pawel Kaminski 2020-02-17 10:50:04 -05:00 committed by Tomasz Zawadzki
parent 686b0d34d2
commit 1499761380

View File

@ -161,6 +161,11 @@ if $rpc_py vhost_scsi_controller_remove_target naa.0 0 > /dev/null; then
error "Removing device 0 from controller naa.0 succeeded, but it shouldn't" error "Removing device 0 from controller naa.0 succeeded, but it shouldn't"
fi fi
notice "Trying to remove scsi target with invalid slot number"
if $rpc_py vhost_scsi_controller_remove_target naa.0 8 > /dev/null; then
error "Removing device 8 from controller naa.0 succeeded, but it shouldn't"
fi
notice "Re-adding device 0 to naa.0" notice "Re-adding device 0 to naa.0"
$rpc_py vhost_scsi_controller_add_target naa.0 0 Malloc0 $rpc_py vhost_scsi_controller_add_target naa.0 0 Malloc0