From 1499761380a5621800583e699b59c3911b349f1c Mon Sep 17 00:00:00 2001 From: Pawel Kaminski Date: Mon, 17 Feb 2020 10:50:04 -0500 Subject: [PATCH] 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 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/935 Tested-by: SPDK CI Jenkins Reviewed-by: Michal Berger Reviewed-by: Shuhei Matsumoto Reviewed-by: Karol Latecki 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 350f0a844..1e73efe71 100755 --- a/test/vhost/other/negative.sh +++ b/test/vhost/other/negative.sh @@ -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" 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" $rpc_py vhost_scsi_controller_add_target naa.0 0 Malloc0