From 50e44f841aeb6122121d8bb67d1cf50954ab164f Mon Sep 17 00:00:00 2001 From: Pawel Kaminski Date: Wed, 5 Feb 2020 07:40:58 -0500 Subject: [PATCH] test/vhost: Add negative test for vhost_scsi_controller_add_target Change-Id: Ie8305b8128ca2a6b16020f72ac5bfa9dec2bb7c0 Signed-off-by: Pawel Kaminski Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/536 Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Maciej Wawryk Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk --- test/vhost/other/negative.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/vhost/other/negative.sh b/test/vhost/other/negative.sh index cd38037fd..a28ec798c 100755 --- a/test/vhost/other/negative.sh +++ b/test/vhost/other/negative.sh @@ -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