test-tool/test_compareandwrite_simple: Limit the number of blocks used

Make sure that 'maxbl' does not exceed the LUN capacity.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
This commit is contained in:
Bart Van Assche
2017-10-31 10:51:17 -07:00
parent 18de10174b
commit 8f2abea4de

View File

@@ -48,6 +48,8 @@ test_compareandwrite_simple(void)
n = 256;
if (n + 0U > num_blocks)
n = num_blocks;
if (maxbl + 0U > num_blocks)
maxbl = num_blocks;
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test COMPARE_AND_WRITE of 1-%d blocks at the "