TESTS: Verify that WACEREQ is 0 if SANITIZE CRYPTO ERASE is not supported

This commit is contained in:
Ronnie Sahlberg
2013-07-05 16:43:28 -07:00
parent accdad5b1a
commit 705bc27ed5
2 changed files with 11 additions and 2 deletions

View File

@@ -214,8 +214,7 @@ test_sanitize_block_erase(void)
CU_FAIL("[FAILED] WABEREQ is not 0 but BLOCK ERASE "
"is not supported.");
}
}
if (cd == NULL) {
logging(LOG_NORMAL, "[SKIPPED] SANITIZE BLOCK_ERASE is not "
"implemented according to REPORT_SUPPORTED_OPCODES.");
CU_PASS("SANITIZE is not implemented.");

View File

@@ -115,6 +115,16 @@ test_sanitize_crypto_erase(void)
cd = get_command_descriptor(SCSI_OPCODE_SANITIZE,
SCSI_SANITIZE_CRYPTO_ERASE);
if (cd == NULL) {
logging(LOG_VERBOSE, "Opcode is not supported. Verify that "
"WACEREQ is zero.");
if (inq_bdc && inq_bdc->wacereq) {
logging(LOG_NORMAL, "[FAILED] WACEREQ is not 0 but "
"SANITIZE CRYPTO ERASE opcode is not "
"supported");
CU_FAIL("[FAILED] WACEREQ is not 0 but CRYPTO ERASE "
"is not supported.");
}
logging(LOG_NORMAL, "[SKIPPED] SANITIZE CRYPTO_ERASE is not "
"implemented according to REPORT_SUPPORTED_OPCODES.");
CU_PASS("SANITIZE is not implemented.");