TESTS: Update WRITE10/12 to allow it to fail with invalid operation code. Both these opcodes are Optional in all SBC standards.

This commit is contained in:
Ronnie Sahlberg
2013-04-23 21:29:25 -07:00
parent ee666ae451
commit b5804ee499
13 changed files with 134 additions and 3 deletions

View File

@@ -66,6 +66,13 @@ test_write12_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] WRITE12 is not implemented.");
CU_PASS("WRITE12 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",