TESTS: move the default url, lun and iscsi context into a structure
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@ test_prefetch10_beyond_eol(void)
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test PREFETCH10 1-256 blocks one block beyond the end");
|
||||
for (i = 1; i <= 256; i++) {
|
||||
ret = prefetch10(iscsic, tgt_lun, num_blocks + 1 - i, i, 0, 0,
|
||||
ret = prefetch10(sd->iscsi_ctx, sd->iscsi_lun, num_blocks + 1 - i, i, 0, 0,
|
||||
EXPECT_LBA_OOB);
|
||||
if (ret == -2) {
|
||||
logging(LOG_NORMAL, "[SKIPPED] PREFETCH10 is not implemented.");
|
||||
@@ -50,7 +50,7 @@ test_prefetch10_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, "Test PREFETCH10 1-256 blocks at LBA==2^31");
|
||||
for (i = 1; i <= 256; i++) {
|
||||
ret = prefetch10(iscsic, tgt_lun, 0x80000000, i, 0, 0,
|
||||
ret = prefetch10(sd->iscsi_ctx, sd->iscsi_lun, 0x80000000, i, 0, 0,
|
||||
EXPECT_LBA_OOB);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ test_prefetch10_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, "Test PREFETCH10 1-256 blocks at LBA==-1");
|
||||
for (i = 1; i <= 256; i++) {
|
||||
ret = prefetch10(iscsic, tgt_lun, -1, i, 0, 0,
|
||||
ret = prefetch10(sd->iscsi_ctx, sd->iscsi_lun, -1, i, 0, 0,
|
||||
EXPECT_LBA_OOB);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ test_prefetch10_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, "Test PREFETCH10 2-256 blocks all but one block beyond the end");
|
||||
for (i = 2; i <= 256; i++) {
|
||||
ret = prefetch10(iscsic, tgt_lun, num_blocks - 1, i, 0, 0,
|
||||
ret = prefetch10(sd->iscsi_ctx, sd->iscsi_lun, num_blocks - 1, i, 0, 0,
|
||||
EXPECT_LBA_OOB);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user