Merge pull request #77 from sitsofe/read6

TESTS: Fix READ6 test
This commit is contained in:
Ronnie Sahlberg
2013-11-03 16:39:21 -08:00
+6 -9
View File
@@ -48,17 +48,14 @@ test_read6_simple(void)
logging(LOG_VERBOSE, "Test READ6 of 1-255 blocks at the end of the LUN"); logging(LOG_VERBOSE, "Test READ6 of 1-255 blocks at the end of the LUN");
if (num_blocks >= 0x1fffff) { if (num_blocks >= 0x1fffff) {
CU_PASS("LUN is too big for read-at-eol tests with READ6. Skipping test.\n"); CU_PASS("LUN is too big for read-at-eol tests with READ6. Skipping test.\n");
return; } else {
for (i = 1; i <= 255; i++) {
ret = read6(iscsic, tgt_lun, num_blocks - i,
i * block_size, block_size, NULL);
CU_ASSERT_EQUAL(ret, 0);
}
} }
for (i = 1; i <= 255; i++) {
ret = read6(iscsic, tgt_lun, num_blocks - i,
i * block_size, block_size, NULL);
CU_ASSERT_EQUAL(ret, 0);
}
logging(LOG_VERBOSE, "Transfer length == 0 means we want to transfer " logging(LOG_VERBOSE, "Transfer length == 0 means we want to transfer "
"256 blocks"); "256 blocks");