TESTS: update the READ tests to the new API

Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
This commit is contained in:
Ronnie Sahlberg
2014-09-17 13:03:23 -07:00
committed by Ronnie Sahlberg
parent 4b2e9bd417
commit 28b0a0ab11
52 changed files with 324 additions and 803 deletions

View File

@@ -31,7 +31,8 @@ test_read12_0blocks(void)
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test READ12 0-blocks at LBA==0");
ret = read12(iscsic, tgt_lun, 0, 0, block_size,
0, 0, 0, 0, 0, NULL);
0, 0, 0, 0, 0, NULL,
EXPECT_STATUS_GOOD);
if (ret == -2) {
logging(LOG_NORMAL, "[SKIPPED] READ12 is not implemented.");
CU_PASS("READ12 is not implemented.");
@@ -45,19 +46,22 @@ test_read12_0blocks(void)
}
logging(LOG_VERBOSE, "Test READ12 0-blocks one block past end-of-LUN");
ret = read12_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1, 0,
block_size, 0, 0, 0, 0, 0, NULL);
ret = read12(iscsic, tgt_lun, num_blocks + 1, 0,
block_size, 0, 0, 0, 0, 0, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test READ12 0-blocks at LBA==2^31");
ret = read12_lbaoutofrange(iscsic, tgt_lun, 0x80000000, 0, block_size,
0, 0, 0, 0, 0, NULL);
ret = read12(iscsic, tgt_lun, 0x80000000, 0, block_size,
0, 0, 0, 0, 0, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test READ12 0-blocks at LBA==-1");
ret = read12_lbaoutofrange(iscsic, tgt_lun, -1, 0, block_size,
0, 0, 0, 0, 0, NULL);
ret = read12(iscsic, tgt_lun, -1, 0, block_size,
0, 0, 0, 0, 0, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
}