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

@@ -30,25 +30,25 @@ test_write10_0blocks(void)
CHECK_FOR_DATALOSS;
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test WRITE10 0-blocks at LBA==0");
ret = write10(iscsic, tgt_lun, 0, 0, block_size,
0, 0, 0, 0, 0, NULL);
if (ret == -2) {
logging(LOG_NORMAL, "[SKIPPED] WRITE10 is not implemented.");
CU_PASS("WRITE10 is not implemented.");
return;
}
CU_ASSERT_EQUAL(ret, 0);
if (num_blocks >= 0x80000000) {
CU_PASS("LUN is too big for read-beyond-eol tests with WRITE10. Skipping test.\n");
return;
}
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test WRITE10 0-blocks at LBA==0");
ret = write10(iscsic, tgt_lun, 0, 0, block_size,
0, 0, 0, 0, 0, NULL);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test WRITE10 0-blocks one block past end-of-LUN");
ret = write10_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1, 0,
block_size, 0, 0, 0, 0, 0, NULL);
if (ret == -2) {
logging(LOG_NORMAL, "[SKIPPED] WRITE16 is not implemented.");
CU_PASS("WRITE10 is not implemented.");
return;
}
CU_ASSERT_EQUAL(ret, 0);