test-tool/test_compareandwrite_simple(): Fix end-of-LUN test

Make sure that the end-of-LUN test happens at the end of the LUN instead
of at the start of the LUN.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
This commit is contained in:
Bart Van Assche
2017-10-30 16:57:58 -07:00
parent 8f468b14fc
commit 18de10174b

View File

@@ -119,7 +119,7 @@ test_compareandwrite_simple(void)
"BlockLimits.MaximumCompareAndWriteLength(%d). "
"Command should fail with INVALID_FIELD_IN_CDB",
i, maxbl);
COMPAREANDWRITE(sd, 0,
COMPAREANDWRITE(sd, num_blocks - i,
scratch, 2 * i * block_size,
block_size, 0, 0, 0, 0,
EXPECT_INVALID_FIELD_IN_CDB);