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 <chris@zankel.net>
This commit is contained in:
Chris Zankel
2015-04-23 15:16:37 -07:00
parent de512a5888
commit a4bde6adfd

View File

@@ -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.");