TESTS: Improve the REPORT SUPPORTED OPCODES test for RCTD and also verify that

the returned timeout descriptors have the correct length.
This commit is contained in:
Ronnie Sahlberg
2013-05-18 14:00:25 -07:00
parent 709410b1d7
commit d34e28dc1a

View File

@@ -67,6 +67,7 @@ test_report_supported_opcodes_rctd(void)
"CTDP set");
}
}
scsi_free_scsi_task(rso_task);
@@ -95,5 +96,16 @@ test_report_supported_opcodes_rctd(void)
}
}
logging(LOG_VERBOSE, "Verify that all timeout descriptors have the "
"correct length");
for (i = 0; i < rsoc->num_descriptors; i++) {
if (rsoc->descriptors[i].to.descriptor_length != 0x0a) {
logging(LOG_NORMAL, "[FAILED] Command descriptor "
"with invalid TimeoutDescriptor length");
CU_FAIL("[FAILED] Command descriptor with "
"invalid TimeoutDescriptor length");
}
}
scsi_free_scsi_task(rso_task);
}