TESTS: update the prefetch tests to the new api
Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
8585e4509b
commit
4b2e9bd417
@@ -32,8 +32,8 @@ test_prefetch16_beyond_eol(void)
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test PREFETCH16 1-256 blocks one block beyond the end");
|
||||
for (i = 1; i <= 256; i++) {
|
||||
ret = prefetch16_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1 - i,
|
||||
i, 0, 0);
|
||||
ret = prefetch16(iscsic, tgt_lun, num_blocks + 1 - i, i, 0, 0,
|
||||
EXPECT_LBA_OOB);
|
||||
if (ret == -2) {
|
||||
logging(LOG_NORMAL, "[SKIPPED] PREFETCH16 is not implemented.");
|
||||
CU_PASS("PREFETCH16 is not implemented.");
|
||||
@@ -45,24 +45,25 @@ test_prefetch16_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, "Test PREFETCH16 1-256 blocks at LBA==2^63");
|
||||
for (i = 1; i <= 256; i++) {
|
||||
ret = prefetch16_lbaoutofrange(iscsic, tgt_lun, 0x8000000000000000ULL,
|
||||
i, 0, 0);
|
||||
ret = prefetch16(iscsic, tgt_lun, 0x8000000000000000ULL,
|
||||
i, 0, 0,
|
||||
EXPECT_LBA_OOB);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Test PREFETCH16 1-256 blocks at LBA==-1");
|
||||
for (i = 1; i <= 256; i++) {
|
||||
ret = prefetch16_lbaoutofrange(iscsic, tgt_lun, -1,
|
||||
i, 0, 0);
|
||||
ret = prefetch16(iscsic, tgt_lun, -1, i, 0, 0,
|
||||
EXPECT_LBA_OOB);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Test PREFETCH16 2-256 blocks all but one block beyond the end");
|
||||
for (i = 2; i <= 256; i++) {
|
||||
ret = prefetch16_lbaoutofrange(iscsic, tgt_lun, num_blocks - 1,
|
||||
i, 0, 0);
|
||||
ret = prefetch16(iscsic, tgt_lun, num_blocks - 1, i, 0, 0,
|
||||
EXPECT_LBA_OOB);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user