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

@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <alloca.h>
#include <CUnit/CUnit.h>
@@ -29,14 +30,13 @@ void
test_writeverify10_flags(void)
{
int ret;
unsigned char *buf;
unsigned char *buf = alloca(block_size);
CHECK_FOR_DATALOSS;
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test WRITEVERIFY10 flags");
buf = malloc(block_size);
logging(LOG_VERBOSE, "Test WRITEVERIFY10 with DPO==1");
ret = writeverify10(iscsic, tgt_lun, 0,
block_size, block_size,
@@ -53,6 +53,4 @@ test_writeverify10_flags(void)
block_size, block_size,
0, 0, 1, 0, buf);
CU_ASSERT_EQUAL(ret, 0);
free(buf);
}