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:
@@ -40,7 +40,7 @@ test_sanitize_reservations(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
|
||||
logging(LOG_VERBOSE, "Create a second connection to the target");
|
||||
iscsic2 = iscsi_context_login(initiatorname2, tgt_url, &tgt_lun);
|
||||
iscsic2 = iscsi_context_login(initiatorname2, sd->iscsi_url, &sd->iscsi_lun);
|
||||
if (iscsic2 == NULL) {
|
||||
logging(LOG_VERBOSE, "Failed to login to target");
|
||||
return;
|
||||
@@ -48,7 +48,7 @@ test_sanitize_reservations(void)
|
||||
|
||||
logging(LOG_VERBOSE, "Take out a RESERVE6 from the second "
|
||||
"initiator");
|
||||
ret = reserve6(iscsic2, tgt_lun);
|
||||
ret = reserve6(iscsic2, sd->iscsi_lun);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ test_sanitize_reservations(void)
|
||||
data.data[1] = 0x00;
|
||||
data.data[2] = block_size >> 8;
|
||||
data.data[3] = block_size & 0xff;
|
||||
ret = sanitize_conflict(iscsic, tgt_lun,
|
||||
ret = sanitize_conflict(sd->iscsi_ctx, sd->iscsi_lun,
|
||||
0, 0, SCSI_SANITIZE_OVERWRITE, data.size, &data);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
@@ -85,7 +85,7 @@ test_sanitize_reservations(void)
|
||||
"implemented according to REPORT_SUPPORTED_OPCODES.");
|
||||
} else {
|
||||
logging(LOG_VERBOSE, "Test SANITIZE BLOCK_ERASE");
|
||||
ret = sanitize_conflict(iscsic, tgt_lun,
|
||||
ret = sanitize_conflict(sd->iscsi_ctx, sd->iscsi_lun,
|
||||
0, 0, SCSI_SANITIZE_BLOCK_ERASE, 0, NULL);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
@@ -99,7 +99,7 @@ test_sanitize_reservations(void)
|
||||
"implemented according to REPORT_SUPPORTED_OPCODES.");
|
||||
} else {
|
||||
logging(LOG_VERBOSE, "Test SANITIZE CRYPTO_ERASE");
|
||||
ret = sanitize_conflict(iscsic, tgt_lun,
|
||||
ret = sanitize_conflict(sd->iscsi_ctx, sd->iscsi_lun,
|
||||
0, 0, SCSI_SANITIZE_CRYPTO_ERASE, 0, NULL);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user