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:
@@ -48,6 +48,8 @@ test_compareandwrite_simple(void)
|
|||||||
n = 256;
|
n = 256;
|
||||||
if (n + 0U > num_blocks)
|
if (n + 0U > num_blocks)
|
||||||
n = num_blocks;
|
n = num_blocks;
|
||||||
|
if (maxbl + 0U > num_blocks)
|
||||||
|
maxbl = num_blocks;
|
||||||
|
|
||||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||||
logging(LOG_VERBOSE, "Test COMPARE_AND_WRITE of 1-%d blocks at the "
|
logging(LOG_VERBOSE, "Test COMPARE_AND_WRITE of 1-%d blocks at the "
|
||||||
|
|||||||
Reference in New Issue
Block a user