From 3e52bdf722610600f53042afd002668aba625bc1 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Tue, 11 Jun 2019 09:15:07 +0900 Subject: [PATCH] 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 Change-Id: I45f2302deaf377fda0ec5454c61fb463231a39db Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457538 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker --- test/unit/lib/util/dif.c/dif_ut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/lib/util/dif.c/dif_ut.c b/test/unit/lib/util/dif.c/dif_ut.c index 866ea0a91..f2e65d782 100644 --- a/test/unit/lib/util/dif.c/dif_ut.c +++ b/test/unit/lib/util/dif.c/dif_ut.c @@ -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,