Commit 0c653409 authored by Karol Latecki's avatar Karol Latecki Committed by Konrad Sztyber
Browse files

test/vhost: add virtio blk transport negative test



Try to create virtio blk transport. Transport is
created at application start, so EEXIST error is
expected.

This is aimed purely at using
rpc_virtio_blk_create_transport() from vhost_rpc.c
to increase code coverage.

Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Change-Id: Iba87ef73f8d5a962bf5eac28c7e6c93bdb65b67f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16436


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 4274fe55
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -205,6 +205,13 @@ if $rpc_py vhost_create_blk_controller blk_ctrl Malloc0; then
fi
$rpc_py bdev_lvol_delete_lvstore -l lvs

notice "Trying to create already existing block transport layer"
# vhost_user_blk transport is created by default on application start,
# so first rpc call to create the transport should fail with EEXIST.
if $rpc_py virtio_blk_create_transport vhost_user_blk; then
	error "Creating already existing virtio blk transport succeded, but shouldn't"
fi

notice "Testing done -> shutting down"
notice "killing vhost app"
vhost_kill 0