TESTS: update read6 to new api

Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
This commit is contained in:
Ronnie Sahlberg
2014-09-17 14:19:24 -07:00
committed by Ronnie Sahlberg
parent 3ee3964332
commit 1c14b9b911
4 changed files with 28 additions and 87 deletions

View File

@@ -38,9 +38,9 @@ test_read6_beyond_eol(void)
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test READ6 1-255 blocks one block beyond the end");
for (i = 1; i <= 255; i++) {
ret = read6_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1 - i,
i * block_size, block_size,
NULL);
ret = read6(iscsic, tgt_lun, num_blocks + 1 - i,
i * block_size, block_size, NULL,
EXPECT_LBA_OOB);
if (ret == -2) {
logging(LOG_NORMAL, "[SKIPPED] READ6 is not implemented.");
CU_PASS("READ6 is not implemented.");
@@ -52,18 +52,18 @@ test_read6_beyond_eol(void)
logging(LOG_VERBOSE, "Test READ6 1-255 blocks at LBA==0x1fffff");
for (i = 1; i <= 255; i++) {
ret = read6_lbaoutofrange(iscsic, tgt_lun, 0x1fffff,
i * block_size, block_size,
NULL);
ret = read6(iscsic, tgt_lun, 0x1fffff,
i * block_size, block_size, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
}
logging(LOG_VERBOSE, "Test READ6 2-255 blocks all but one block beyond the end");
for (i = 2; i <= 255; i++) {
ret = read6_lbaoutofrange(iscsic, tgt_lun, num_blocks - 1,
i * block_size, block_size,
NULL);
ret = read6(iscsic, tgt_lun, num_blocks - 1,
i * block_size, block_size, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
}
}