TESTS: add a flag --usb so we can clamp all i/o to at most 120k

Add checks for maximum tranfer length to all commands that are limited
by BlockLimits/MTL
This commit is contained in:
Ronnie Sahlberg
2013-04-27 09:59:59 -07:00
parent c866787dcb
commit 2627a8845e
69 changed files with 500 additions and 354 deletions

View File

@@ -1,4 +1,3 @@
/*
Copyright (C) 2012 by Lee Duncan <lee@gonzoleeman.net>
@@ -35,6 +34,9 @@ test_read10_simple(void)
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test READ10 of 1-256 blocks at the start of the LUN");
for (i = 1; i <= 256; i++) {
if (maximum_transfer_length && maximum_transfer_length < i) {
break;
}
ret = read10(iscsic, tgt_lun, 0, i * block_size,
block_size, 0, 0, 0, 0, 0, NULL);
CU_ASSERT_EQUAL(ret, 0);
@@ -43,6 +45,9 @@ test_read10_simple(void)
logging(LOG_VERBOSE, "Test READ10 of 1-256 blocks at the end of the LUN");
for (i = 1; i <= 256; i++) {
if (maximum_transfer_length && maximum_transfer_length < i) {
break;
}
ret = read10(iscsic, tgt_lun, num_blocks - i,
i * block_size, block_size, 0, 0, 0, 0, 0, NULL);
CU_ASSERT_EQUAL(ret, 0);