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

@@ -33,7 +33,8 @@ test_read16_0blocks(void)
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test READ16 0-blocks at LBA==0");
ret = read16(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] READ16 is not implemented on this target and it does not claim SBC-3 support.");
CU_PASS("READ16 is not implemented and no SBC-3 support claimed.");
@@ -42,19 +43,22 @@ test_read16_0blocks(void)
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test READ16 0-blocks one block past end-of-LUN");
ret = read16_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1, 0,
block_size, 0, 0, 0, 0, 0, NULL);
ret = read16(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 READ16 0-blocks at LBA==2^63");
ret = read16_lbaoutofrange(iscsic, tgt_lun, 0x8000000000000000ULL, 0,
block_size, 0, 0, 0, 0, 0, NULL);
ret = read16(iscsic, tgt_lun, 0x8000000000000000ULL, 0,
block_size, 0, 0, 0, 0, 0, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test READ16 0-blocks at LBA==-1");
ret = read16_lbaoutofrange(iscsic, tgt_lun, -1, 0, block_size,
0, 0, 0, 0, 0, NULL);
ret = read16(iscsic, tgt_lun, -1, 0, block_size,
0, 0, 0, 0, 0, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
}