TESTS: ReportSuppOpcodes, handle broken targets that return success but no data.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2015-09-19 15:47:13 -07:00
parent d7606c44e2
commit f7ea45e053
3 changed files with 21 additions and 2 deletions

View File

@@ -59,7 +59,13 @@ test_report_supported_opcodes_one_command(void)
logging(LOG_VERBOSE, "Unmarshall the DATA-IN buffer");
rsoc = scsi_datain_unmarshall(rso_task);
CU_ASSERT_NOT_EQUAL(rsoc, NULL);
if (!rsoc) {
logging(LOG_NORMAL, "[FAILED] Target did not return any data "
"for ReportSupportedOpcodes\n");
CU_FAIL("Target did not return any data for "
"ReportSupportedOpcodes");
return;
}
logging(LOG_VERBOSE, "Verify read one-command works for all supported "
"opcodes");

View File

@@ -59,7 +59,13 @@ test_report_supported_opcodes_rctd(void)
logging(LOG_VERBOSE, "Unmarshall the DATA-IN buffer");
rsoc = scsi_datain_unmarshall(rso_task);
CU_ASSERT_NOT_EQUAL(rsoc, NULL);
if (!rsoc) {
logging(LOG_NORMAL, "[FAILED] Target did not return any data "
"for ReportSupportedOpcodes\n");
CU_FAIL("Target did not return any data for "
"ReportSupportedOpcodes");
return;
}
logging(LOG_VERBOSE, "Verify that all returned command descriptors "
"lack timeout description");

View File

@@ -57,6 +57,13 @@ test_report_supported_opcodes_servactv(void)
logging(LOG_VERBOSE, "Unmarshall the DATA-IN buffer");
rsoc = scsi_datain_unmarshall(rso_task);
CU_ASSERT_NOT_EQUAL(rsoc, NULL);
if (!rsoc) {
logging(LOG_NORMAL, "[FAILED] Target did not return any data "
"for ReportSupportedOpcodes\n");
CU_FAIL("Target did not return any data for "
"ReportSupportedOpcodes");
return;
}
logging(LOG_VERBOSE, "Verify that when SERVACTV is clear then "