TESTS: get rid of iscsic2

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2014-09-18 18:37:35 -07:00
parent 072291c852
commit 74a50052cd
6 changed files with 75 additions and 61 deletions

View File

@@ -98,10 +98,14 @@ test_prout_reserve_ownership_ea(void)
{
struct scsi_device sd2;
sd2.iscsi_ctx = iscsic2;
sd2.iscsi_lun = tgt_lun2;
sd2.iscsi_ctx = iscsi_context_login(initiatorname2, sd->iscsi_url, &sd2.iscsi_lun);
if (sd2.iscsi_ctx == NULL) {
logging(LOG_VERBOSE, "Failed to login to target");
return;
}
verify_persistent_reserve_ownership(sd, &sd2,
SCSI_PERSISTENT_RESERVE_TYPE_EXCLUSIVE_ACCESS, 0);
iscsi_destroy_context(sd2.iscsi_ctx);
}
void
@@ -109,10 +113,14 @@ test_prout_reserve_ownership_we(void)
{
struct scsi_device sd2;
sd2.iscsi_ctx = iscsic2;
sd2.iscsi_lun = tgt_lun2;
sd2.iscsi_ctx = iscsi_context_login(initiatorname2, sd->iscsi_url, &sd2.iscsi_lun);
if (sd2.iscsi_ctx == NULL) {
logging(LOG_VERBOSE, "Failed to login to target");
return;
}
verify_persistent_reserve_ownership(sd, &sd2,
SCSI_PERSISTENT_RESERVE_TYPE_WRITE_EXCLUSIVE, 0);
iscsi_destroy_context(sd2.iscsi_ctx);
}
void
@@ -120,10 +128,14 @@ test_prout_reserve_ownership_earo(void)
{
struct scsi_device sd2;
sd2.iscsi_ctx = iscsic2;
sd2.iscsi_lun = tgt_lun2;
sd2.iscsi_ctx = iscsi_context_login(initiatorname2, sd->iscsi_url, &sd2.iscsi_lun);
if (sd2.iscsi_ctx == NULL) {
logging(LOG_VERBOSE, "Failed to login to target");
return;
}
verify_persistent_reserve_ownership(sd, &sd2,
SCSI_PERSISTENT_RESERVE_TYPE_EXCLUSIVE_ACCESS_REGISTRANTS_ONLY, 0);
iscsi_destroy_context(sd2.iscsi_ctx);
}
void
@@ -131,10 +143,14 @@ test_prout_reserve_ownership_wero(void)
{
struct scsi_device sd2;
sd2.iscsi_ctx = iscsic2;
sd2.iscsi_lun = tgt_lun2;
sd2.iscsi_ctx = iscsi_context_login(initiatorname2, sd->iscsi_url, &sd2.iscsi_lun);
if (sd2.iscsi_ctx == NULL) {
logging(LOG_VERBOSE, "Failed to login to target");
return;
}
verify_persistent_reserve_ownership(sd, &sd2,
SCSI_PERSISTENT_RESERVE_TYPE_WRITE_EXCLUSIVE_REGISTRANTS_ONLY, 0);
iscsi_destroy_context(sd2.iscsi_ctx);
}
void
@@ -142,10 +158,14 @@ test_prout_reserve_ownership_eaar(void)
{
struct scsi_device sd2;
sd2.iscsi_ctx = iscsic2;
sd2.iscsi_lun = tgt_lun2;
sd2.iscsi_ctx = iscsi_context_login(initiatorname2, sd->iscsi_url, &sd2.iscsi_lun);
if (sd2.iscsi_ctx == NULL) {
logging(LOG_VERBOSE, "Failed to login to target");
return;
}
verify_persistent_reserve_ownership(sd, &sd2,
SCSI_PERSISTENT_RESERVE_TYPE_EXCLUSIVE_ACCESS_ALL_REGISTRANTS, 1);
iscsi_destroy_context(sd2.iscsi_ctx);
}
void
@@ -153,8 +173,12 @@ test_prout_reserve_ownership_wear(void)
{
struct scsi_device sd2;
sd2.iscsi_ctx = iscsic2;
sd2.iscsi_lun = tgt_lun2;
sd2.iscsi_ctx = iscsi_context_login(initiatorname2, sd->iscsi_url, &sd2.iscsi_lun);
if (sd2.iscsi_ctx == NULL) {
logging(LOG_VERBOSE, "Failed to login to target");
return;
}
verify_persistent_reserve_ownership(sd, &sd2,
SCSI_PERSISTENT_RESERVE_TYPE_WRITE_EXCLUSIVE_ALL_REGISTRANTS, 1);
iscsi_destroy_context(sd2.iscsi_ctx);
}