TEST: Add test for the protection information setting in READCAPACITY16

If the device does not support PI (INQ->PROTECT) then
verify that PROT_EN, P_TYPE and P_I_EXP are all zero.

If the device does support PI and IF PROT_EN is clear
then verify that both P_TYPE and P_I_EXP are zero.

If the device does support PI and IF PROT_EN is set
then verify that P_TYPE is 0, 1 or 2
This commit is contained in:
Ronnie Sahlberg
2013-05-13 20:03:56 -07:00
parent f9fb1e0ee3
commit f49a1beb16
4 changed files with 117 additions and 2 deletions

View File

@@ -212,6 +212,7 @@ static CU_TestInfo tests_readcapacity10[] = {
static CU_TestInfo tests_readcapacity16[] = {
{ (char *)"ReadCapacity16Simple", test_readcapacity16_simple },
{ (char *)"ReadCapacity16Alloclen", test_readcapacity16_alloclen },
{ (char *)"ReadCapacity16PI", test_readcapacity16_protection },
CU_TEST_INFO_NULL
};