diff --git a/test-tool/test_sanitize_block_erase.c b/test-tool/test_sanitize_block_erase.c index f88b4d2..a52173b 100644 --- a/test-tool/test_sanitize_block_erase.c +++ b/test-tool/test_sanitize_block_erase.c @@ -48,6 +48,17 @@ test_sanitize_block_erase(void) CU_PASS("SANITIZE is not implemented."); return; } + if (inq_bdc == NULL) { + logging(LOG_NORMAL, "[WARNING] SANITIZE BLOCK ERASE opcode is " + "supported but BlockDeviceCharacteristics VPD page is " + "missing"); + } + if (inq_bdc && inq_bdc->medium_rotation_rate != 0) { + logging(LOG_NORMAL, "[WARNING] SANITIZE BLOCK ERASE opcode is " + "supported but MediumRotationRate is not 0 " + "indicating that this is a HDD. Only SSDs should " + "implement BLOCK ERASE"); + } logging(LOG_VERBOSE, "Test we can perform basic BLOCK ERASE SANITIZE"); diff --git a/test-tool/test_sanitize_overwrite.c b/test-tool/test_sanitize_overwrite.c index 113e06c..98295bf 100644 --- a/test-tool/test_sanitize_overwrite.c +++ b/test-tool/test_sanitize_overwrite.c @@ -48,6 +48,17 @@ test_sanitize_overwrite(void) CU_PASS("SANITIZE is not implemented."); return; } + if (inq_bdc == NULL) { + logging(LOG_NORMAL, "[WARNING] SANITIZE OVERWRITE opcode is " + "supported but BlockDeviceCharacteristics VPD page is " + "missing"); + } + if (inq_bdc && inq_bdc->medium_rotation_rate == 0) { + logging(LOG_NORMAL, "[WARNING] SANITIZE OVERWRITE opcode is " + "supported but MediumRotationRate is 0 " + "indicating that this is an SSD. Only HDDs should " + "implement OVERWRITE"); + } logging(LOG_VERBOSE, "Test SANITIZE OVERWRITE with initialization pattern of one full block"); data.size = block_size + 4;