test/vhost: Add negative test for vhost_scsi_controller_add_target

Change-Id: Ie8305b8128ca2a6b16020f72ac5bfa9dec2bb7c0
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/536
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Pawel Kaminski 2020-02-05 07:40:58 -05:00 committed by Tomasz Zawadzki
parent 6668f0d9f2
commit 50e44f841a

View File

@ -120,6 +120,11 @@ if [[ $RUN_NIGHTLY -eq 1 ]]; then
error "Set coalescing with invalid parameter should fail"
fi
notice "Trying to add nonexistent device to scsi controller"
if $rpc_py vhost_scsi_controller_add_target naa.0 0 nonexistent_bdev; then
error "Adding nonexistent device to scsi controller succeeded, but it shouldn't"
fi
notice "Adding initial device (0) to naa.0"
$rpc_py vhost_scsi_controller_add_target naa.0 0 Malloc0