Spdk/test/unit/lib/vhost
Dariusz Stojaczyk 341a489ac9 ut/vhost: add helper functions to start/stop a device
This refactors the way we setup vhost devices.
Hopefully when we change internal vhost ABI/logic
in future, we won't have to go through all vhost
test cases and refactor them.

alloc_vdev - allocate *and* register the device.
It makes little to no sense to have a non-registered
device since you cannot call any spdk_vhost_dev_*
functions on it.

start_vdev - simulate a connection on the device
socket

stop_vdev - close the connection

cleanup_vdev - do everything necessary to cleanup
and free the vdev This implies closing the connection.

Change-Id: Ic97f969ec7a57cec7092c0f7681c2e7e44ceb31e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399603
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 15:36:26 -05:00
..
vhost_blk.c test: use spdk.unittest.mk for vhost unit tests 2018-02-14 11:07:05 -05:00
vhost_scsi.c test: use spdk.unittest.mk for vhost unit tests 2018-02-14 11:07:05 -05:00
vhost.c ut/vhost: add helper functions to start/stop a device 2018-02-14 15:36:26 -05:00
Makefile ut/vhost: add UT coverage for vhost_blk.c 2017-09-06 18:14:15 -04:00
test_vhost.c vhost: remove vdev->type field 2018-02-06 11:05:01 -05:00