ported group reservation access control test to CUnit

Ported group reservation access control test to CUnit format.
This is the final group reservation test to be ported.
This commit is contained in:
Lee Duncan
2013-02-16 13:56:22 -08:00
committed by Ronnie Sahlberg
parent 9b436eee2f
commit 07bb4d04d2
6 changed files with 262 additions and 6 deletions

View File

@@ -816,6 +816,32 @@ testunitready(struct iscsi_context *iscsi, int lun)
return 0;
}
int
testunitready_clear_ua(struct iscsi_context *iscsi, int lun)
{
struct scsi_task *task;
logging(LOG_VERBOSE,
"Send TESTUNITREADY (To Clear Possible UA) init=%s",
iscsi->initiator_name);
task = iscsi_testunitready_sync(iscsi, lun);
if (task == NULL) {
logging(LOG_NORMAL,
"[FAILED] Failed to send TESTUNITREADY command: %s",
iscsi_get_error(iscsi));
return -1;
}
if (task->status != SCSI_STATUS_GOOD) {
logging(LOG_NORMAL,
"[INFO] TESTUNITREADY command: failed with sense. %s",
iscsi_get_error(iscsi));
}
scsi_free_scsi_task(task);
return 0;
}
int
testunitready_nomedium(struct iscsi_context *iscsi, int lun)
{