test/vhost Add negative test for vhost_create_blk_controller rpc

Try to create blk controller with bdev that is already
claimed by lvol module

Change-Id: Id034968e12c946d18c063056f5b7fb01883af6d6
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/929
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:01:59 -05:00 committed by Tomasz Zawadzki
parent 92e908e6bb
commit 686b0d34d2

View File

@ -180,6 +180,18 @@ if $rpc_py vhost_create_blk_controller . Malloc0; then
error "Creating block controller with incorrect name succeeded, but it shouldn't"
fi
notice "Trying to create block controller with nonexistent bdev"
if $rpc_py vhost_create_blk_controller blk_ctrl Malloc3; then
error "Creating block controller with nonexistent bdev succeeded, but shouldn't"
fi
notice "Trying to create block controller with claimed bdev"
$rpc_py bdev_lvol_create_lvstore Malloc0 lvs
if $rpc_py vhost_create_blk_controller blk_ctrl Malloc0; then
error "Creating block controller with claimed bdev succeeded, but shouldn't"
fi
$rpc_py bdev_lvol_delete_lvstore -l lvs
notice "Testing done -> shutting down"
notice "killing vhost app"
vhost_kill 0