ut/bdev_raid: Fix the failure for single base bdev case

For single base bdev case, IO is changed not to be split. However
UT code was not changed together.

Change-Id: I81e66b256892b7bee7a42c72bb0bce6d3320b617
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/425534
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2018-09-14 11:32:30 +09:00 committed by Jim Harris
parent 8e54e10c4f
commit 37368624f3

View File

@ -881,8 +881,13 @@ verify_raid_bdev(struct rpc_construct_raid_bdev *r, bool presence, uint32_t raid
CU_ASSERT(strcmp(pbdev->bdev.product_name, "Pooled Device") == 0);
CU_ASSERT(pbdev->bdev.write_cache == 0);
CU_ASSERT(pbdev->bdev.blocklen == g_block_len);
CU_ASSERT(pbdev->bdev.optimal_io_boundary == pbdev->strip_size);
CU_ASSERT(pbdev->bdev.split_on_optimal_io_boundary == true);
if (pbdev->num_base_bdevs > 1) {
CU_ASSERT(pbdev->bdev.optimal_io_boundary == pbdev->strip_size);
CU_ASSERT(pbdev->bdev.split_on_optimal_io_boundary == true);
} else {
CU_ASSERT(pbdev->bdev.optimal_io_boundary == 0);
CU_ASSERT(pbdev->bdev.split_on_optimal_io_boundary == false);
}
CU_ASSERT(pbdev->bdev.ctxt == pbdev);
CU_ASSERT(pbdev->bdev.fn_table == &g_raid_bdev_fn_table);
CU_ASSERT(pbdev->bdev.module == &g_raid_if);