TESTS: update the prefetch tests to the new api

Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
This commit is contained in:
Ronnie Sahlberg
2014-09-17 10:33:54 -07:00
committed by Ronnie Sahlberg
parent 8585e4509b
commit 4b2e9bd417
11 changed files with 85 additions and 275 deletions

View File

@@ -30,8 +30,8 @@ test_prefetch16_0blocks(void)
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test PREFETCH16 0-blocks at LBA==0");
ret = prefetch16(iscsic, tgt_lun, 0,
0, 0, 0);
ret = prefetch16(iscsic, tgt_lun, 0, 0, 0, 0,
EXPECT_STATUS_GOOD);
if (ret == -2) {
logging(LOG_NORMAL, "[SKIPPED] PREFETCH16 is not implemented.");
CU_PASS("PREFETCH16 is not implemented.");
@@ -40,19 +40,19 @@ test_prefetch16_0blocks(void)
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test PREFETCH16 0-blocks one block past end-of-LUN");
ret = prefetch16_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1,
0, 0, 0);
ret = prefetch16(iscsic, tgt_lun, num_blocks + 1, 0, 0, 0,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test PREFETCH16 0-blocks at LBA==2^63");
ret = prefetch16_lbaoutofrange(iscsic, tgt_lun, 0x8000000000000000ULL,
0, 0, 0);
ret = prefetch16(iscsic, tgt_lun, 0x8000000000000000ULL, 0, 0, 0,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test PREFETCH16 0-blocks at LBA==-1");
ret = prefetch16_lbaoutofrange(iscsic, tgt_lun, -1,
0, 0, 0);
ret = prefetch16(iscsic, tgt_lun, -1, 0, 0, 0,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
}