Commit 8c5c2c56 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

ut/bdev_raid: Remove raid_bdev_send_passthru dependent test



Cleverly, UT for raid bdev sets number of base bdevs by using
the random number generator.

When the random number generator outputs 1, test code especially
for single base bdev case failed.

When removing raid_bdev_send_passthru from library, the corresponding
test code was not removed.

This patch removes the test code.

Change-Id: I23be88358fe364bc757979a26398b80339e19910
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/424159


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarKunal Sablok <kunal.sablok@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 9b47c7e7
Loading
Loading
Loading
Loading
+23 −32
Original line number Diff line number Diff line
@@ -704,7 +704,6 @@ verify_io(struct spdk_bdev_io *bdev_io, uint8_t num_base_drives,
	SPDK_CU_ASSERT_FATAL(raid_bdev != NULL);
	SPDK_CU_ASSERT_FATAL(num_base_drives != 0);

	if (raid_bdev->num_base_bdevs > 1) {
	CU_ASSERT(splits_reqd == g_io_output_index);
	for (strip = start_strip; strip <= end_strip; strip++, index++) {
		pd_strip = strip / num_base_drives;
@@ -733,14 +732,6 @@ verify_io(struct spdk_bdev_io *bdev_io, uint8_t num_base_drives,
		CU_ASSERT(bdev_io->type == g_io_output[index].iotype);
		buf += (pd_blocks << spdk_u32log2(g_block_len));
	}
	} else {
		CU_ASSERT(g_io_output_index == 1);
		CU_ASSERT(bdev_io->u.bdev.offset_blocks == g_io_output[0].offset_blocks);
		CU_ASSERT(bdev_io->u.bdev.num_blocks == g_io_output[0].num_blocks);
		CU_ASSERT(ch_ctx->base_channel[0] == g_io_output[0].ch);
		CU_ASSERT(raid_bdev->base_bdev_info[0].desc == g_io_output[0].desc);
		CU_ASSERT(buf == g_io_output[index].buf);
	}
	CU_ASSERT(g_io_comp_status == io_status);
}