From 6668f0d9f2428dab3e9f303105a1a2fd9aad0f56 Mon Sep 17 00:00:00 2001 From: Pawel Kaminski Date: Thu, 30 Jan 2020 17:46:10 -0500 Subject: [PATCH] test/vhost: Add negative test for vhost_controller_set_coalescing rpc Change-Id: I883d20d9ff2d1da1de89543cf81c9f3d3712e44f Signed-off-by: Pawel Kaminski Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/535 Reviewed-by: Karol Latecki Reviewed-by: Maciej Wawryk Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk Tested-by: SPDK CI Jenkins --- test/vhost/other/negative.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/vhost/other/negative.sh b/test/vhost/other/negative.sh index 5b7d04baa..cd38037fd 100755 --- a/test/vhost/other/negative.sh +++ b/test/vhost/other/negative.sh @@ -80,6 +80,11 @@ if [[ $RUN_NIGHTLY -eq 1 ]]; then error "vhost returned controller that does not exist" fi + notice "Set coalescing for nonexistent controller" + if $rpc_py vhost_controller_set_coalescing nonexistent 1 100; then + error "Set coalescing for nonexistent controller should fail" + fi + # General commands notice "Trying to remove nonexistent controller" if $rpc_py vhost_delete_controller unk0 > /dev/null; then @@ -110,6 +115,11 @@ if [[ $RUN_NIGHTLY -eq 1 ]]; then notice "Creating controller naa.0" $rpc_py vhost_create_scsi_controller naa.0 + notice "Pass invalid parameter for vhost_controller_set_coalescing" + if $rpc_py vhost_controller_set_coalescing naa.0 -1 100; then + error "Set coalescing with invalid parameter should fail" + fi + notice "Adding initial device (0) to naa.0" $rpc_py vhost_scsi_controller_add_target naa.0 0 Malloc0