Commit 686b0d34 authored by Pawel Kaminski's avatar Pawel Kaminski Committed by Tomasz Zawadzki
Browse files

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: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/929


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 92e908e6
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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