dif: Fix wrong data_offset of spdk_dif_generate_stream in UT

data_offset to spdk_dif_generate_stream() was wrong but the function
worked as expected because the wrong data_offset was in the same
data block as the correct data_offset.

But the subsequent patches will refine spdk_dif_generate_stream()
and this bug will cause UT failure. Hence fix the bug up front.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I45f2302deaf377fda0ec5454c61fb463231a39db
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-06-11 09:15:07 +09:00 committed by Ben Walker
parent e83d5c4a2d
commit 3e52bdf722

View File

@ -1575,7 +1575,7 @@ set_md_interleave_iovs_split_test(void)
read_base += ut_readv(read_base, 1 + 512 * 2 + 128, dif_iovs, 8);
CU_ASSERT(read_base == 512 * 3 + 128);
rc = spdk_dif_generate_stream(iovs1, 7, 383, 1 + 512 * 2 + 128, &ctx);
rc = spdk_dif_generate_stream(iovs1, 7, 511, 1 + 512 * 2 + 128, &ctx);
CU_ASSERT(rc == 0);
rc = spdk_dif_set_md_interleave_iovs(dif_iovs, 8, iovs1, 7,