TESTS: Print correct sense data when a command fail that were expected to succeed

This commit is contained in:
Ronnie Sahlberg
2015-09-10 16:45:24 -07:00
parent 126bbd8b29
commit fd55600d39

View File

@@ -179,7 +179,10 @@ static int check_result(const char *opcode, struct scsi_device *sdev,
}
if (status == SCSI_STATUS_GOOD && task->status != SCSI_STATUS_GOOD) {
logging(LOG_NORMAL, "[FAILED] %s command failed with "
"sense. %s", opcode, sdev->error_str);
"sense. %s(0x%02x)/%s(0x%04x)",
opcode,
scsi_sense_key_str(task->sense.key), task->sense.key,
scsi_sense_ascq_str(task->sense.ascq), task->sense.ascq);
return -1;
}
if (status != SCSI_STATUS_GOOD && task->status == SCSI_STATUS_GOOD) {