TESTS: WRITEVERIFY10/12/16 are all optional.

Update the helpers to return -2/not supported on invalid operaction code.
Update all tests to accept that the opcode might be missing and abort the test without failing.
This commit is contained in:
Ronnie Sahlberg
2013-04-25 17:41:13 -07:00
parent b5804ee499
commit e33194d94a
18 changed files with 194 additions and 2 deletions

View File

@@ -74,6 +74,13 @@ test_writeverify12_residuals(void)
CU_ASSERT_PTR_NOT_NULL(task_ret);
CU_ASSERT_NOT_EQUAL(task->status, SCSI_STATUS_CANCELLED); /* XXX redundant? */
if (task->status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
logging(LOG_NORMAL, "[SKIPPED] WRITEVERIFY12 is not implemented.");
CU_PASS("WRITEVERIFY12 is not implemented.");
return;
}
logging(LOG_VERBOSE, "Verify that the target returned SUCCESS");
if (task->status != SCSI_STATUS_GOOD) {
logging(LOG_VERBOSE, "[FAILED] Target returned error %s",