From e3a29c0fed0dbd1f52635a84818961ea7fd3402e Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Fri, 5 Jul 2013 14:52:51 -0700 Subject: [PATCH] TESTS:SANITIZE verify that if BLOCK_ERASE is available we have LBPME==1 --- test-tool/test_sanitize_block_erase.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test-tool/test_sanitize_block_erase.c b/test-tool/test_sanitize_block_erase.c index 30b42f1..40f1bd1 100644 --- a/test-tool/test_sanitize_block_erase.c +++ b/test-tool/test_sanitize_block_erase.c @@ -148,6 +148,22 @@ test_sanitize_block_erase(void) "page is missing"); } + logging(LOG_VERBOSE, "Verify that we have READCAPACITY16"); + if (!rc16) { + logging(LOG_NORMAL, "[FAILED] SANITIZE BLOCK ERASE opcode is " + "supported but READCAPACITY16 is missing."); + CU_FAIL("[FAILED] READCAPACITY16 is missing"); + } + + logging(LOG_VERBOSE, "Verify that logical block provisioning (LBPME) " + "is available."); + if (!rc16 || !(rc16->lbpme)) { + logging(LOG_NORMAL, "[FAILED] SANITIZE BLOCK ERASE opcode is " + "supported but LBPME==0."); + CU_FAIL("[FAILED] SANITIZE BLOCK ERASE opcode is " + "supported but LBPME==0."); + } + logging(LOG_VERBOSE, "Check MediumRotationRate whether this is a HDD " "or a SSD device."); if (inq_bdc && inq_bdc->medium_rotation_rate != 0) {