From e8c4be8f629dac368364d669217ee6d6a3e85bc3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 17 Aug 2014 18:12:48 +0200 Subject: [PATCH] test_writesame16_0blocks: Add support for WSNZ=1 Support for WRITE SAME with NUMBER OF LOGICAL BLOCKS = 0 is optional. Hence set NUMBER OF LOGICAL BLOCKS to 0 if this value is supported and set this parameter to 1 otherwise. Signed-off-by: Bart Van Assche --- test-tool/test_writesame16_0blocks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-tool/test_writesame16_0blocks.c b/test-tool/test_writesame16_0blocks.c index 371e0d9..b1f8388 100644 --- a/test-tool/test_writesame16_0blocks.c +++ b/test-tool/test_writesame16_0blocks.c @@ -55,21 +55,21 @@ test_writesame16_0blocks(void) logging(LOG_VERBOSE, "Test WRITESAME16 0-blocks one block past end-of-LUN"); ret = writesame16_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1, - block_size, 0, + block_size, inq_bl->wsnz, 0, 0, 0, 0, NULL); CU_ASSERT_EQUAL(ret, 0); logging(LOG_VERBOSE, "Test WRITESAME16 0-blocks at LBA==2^63"); ret = writesame16_lbaoutofrange(iscsic, tgt_lun, 0x8000000000000000, - block_size, 0, + block_size, inq_bl->wsnz, 0, 0, 0, 0, NULL); CU_ASSERT_EQUAL(ret, 0); logging(LOG_VERBOSE, "Test WRITESAME16 0-blocks at LBA==-1"); ret = writesame16_lbaoutofrange(iscsic, tgt_lun, -1, - block_size, 0, + block_size, inq_bl->wsnz, 0, 0, 0, 0, NULL); CU_ASSERT_EQUAL(ret, 0); }