Commit 3e52bdf7 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Ben Walker
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I45f2302deaf377fda0ec5454c61fb463231a39db
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457538


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent e83d5c4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,