From a4bde6adfd63e1783a89b289fb2f8bed5aa61382 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Thu, 23 Apr 2015 15:16:37 -0700 Subject: [PATCH] test_writesame16_unmap_until_end: pass 0 blocks instead of 0-length block The test: "Test WRITESAME16 of 1-256 blocks at the end of the LUN by setting number-of-blocks==0" was passing 0 for the data length instead of the block count. Signed-off-by: Chris Zankel --- test-tool/test_writesame16_unmap_until_end.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test-tool/test_writesame16_unmap_until_end.c b/test-tool/test_writesame16_unmap_until_end.c index be2d187..2e6f69f 100644 --- a/test-tool/test_writesame16_unmap_until_end.c +++ b/test-tool/test_writesame16_unmap_until_end.c @@ -58,8 +58,9 @@ test_writesame16_unmap_until_end(void) i * block_size, block_size, 0, 0, 0, 0, 0, buf, EXPECT_STATUS_GOOD); logging(LOG_VERBOSE, "Unmap %d blocks using WRITESAME16", i); + memset(buf, 0, block_size); ret = writesame16(sd, num_blocks - i, - 0, i, 0, 1, 0, 0, NULL, + block_size, 0, 0, 1, 0, 0, buf, EXPECT_STATUS_GOOD); if (ret == -2) { logging(LOG_NORMAL, "[SKIPPED] WRITESAME16 is not implemented.");