test/bdevio: test functions now execute test calls directly
Before simplifying test suite execution it was needed to loop around function actually running the tests. So the test functions now can directly contain whatever that was doing, without intermidiate function between. Change-Id: Ic4b648d8d26d6be7a3bf1efb1b1ee3f2615ee5fa Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455672 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
2b09903c2c
commit
04f7575bc4
@ -810,24 +810,18 @@ __blockdev_reset(void *arg1, void *arg2)
|
||||
}
|
||||
|
||||
static void
|
||||
blockdev_reset(struct io_target *target)
|
||||
blockdev_test_reset(void)
|
||||
{
|
||||
struct bdevio_request req;
|
||||
struct io_target *target;
|
||||
|
||||
target = g_current_io_target;
|
||||
req.target = target;
|
||||
|
||||
g_completion_success = false;
|
||||
|
||||
execute_spdk_function(__blockdev_reset, &req, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
blockdev_test_reset(void)
|
||||
{
|
||||
struct io_target *target;
|
||||
|
||||
target = g_current_io_target;
|
||||
blockdev_reset(target);
|
||||
/* Workaround: NVMe-oF target doesn't support reset yet - so for now
|
||||
* don't fail the test if it's an NVMe bdev.
|
||||
*/
|
||||
@ -871,10 +865,13 @@ __blockdev_nvme_passthru(void *arg1, void *arg2)
|
||||
}
|
||||
|
||||
static void
|
||||
blockdev_nvme_passthru_rw(struct io_target *target)
|
||||
blockdev_test_nvme_passthru_rw(void)
|
||||
{
|
||||
struct bdevio_passthrough_request pt_req;
|
||||
void *write_buf, *read_buf;
|
||||
struct io_target *target;
|
||||
|
||||
target = g_current_io_target;
|
||||
|
||||
if (!spdk_bdev_io_type_supported(target->bdev, SPDK_BDEV_IO_TYPE_NVME_IO)) {
|
||||
return;
|
||||
@ -914,18 +911,12 @@ blockdev_nvme_passthru_rw(struct io_target *target)
|
||||
}
|
||||
|
||||
static void
|
||||
blockdev_test_nvme_passthru_rw(void)
|
||||
{
|
||||
struct io_target *target;
|
||||
|
||||
target = g_current_io_target;
|
||||
blockdev_nvme_passthru_rw(target);
|
||||
}
|
||||
|
||||
static void
|
||||
blockdev_nvme_passthru_vendor_specific(struct io_target *target)
|
||||
blockdev_test_nvme_passthru_vendor_specific(void)
|
||||
{
|
||||
struct bdevio_passthrough_request pt_req;
|
||||
struct io_target *target;
|
||||
|
||||
target = g_current_io_target;
|
||||
|
||||
if (!spdk_bdev_io_type_supported(target->bdev, SPDK_BDEV_IO_TYPE_NVME_IO)) {
|
||||
return;
|
||||
@ -943,15 +934,6 @@ blockdev_nvme_passthru_vendor_specific(struct io_target *target)
|
||||
CU_ASSERT(pt_req.sc == SPDK_NVME_SC_INVALID_OPCODE);
|
||||
}
|
||||
|
||||
static void
|
||||
blockdev_test_nvme_passthru_vendor_specific(void)
|
||||
{
|
||||
struct io_target *target;
|
||||
|
||||
target = g_current_io_target;
|
||||
blockdev_nvme_passthru_vendor_specific(target);
|
||||
}
|
||||
|
||||
static void
|
||||
__stop_init_thread(void *arg1, void *arg2)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user