0410 is the first test for the MMC commandset.
This commandset is in hindsight a bit more complex than other commandsets
in that we have to handle quite a lot of cases :
1, if it is not a MMC device, we should check we get INVALID_OPCODE and then
bail.
Then if it is a MMC device, there are at least three different cases we have to
handle:
2.a If there is no medium in the device
2.b there is media, but the medium is blank
2.c there is readable medium
this makes MMC tests a lot more complex than other commandsets
so we have to try to get this one as nice and simple as possible so we can
reuse this test as the framework when adding other MMC tests.
(even the 2.b test is not 100% right, since if the medium is BR, then a blank disk will fail with sense, but blank pre-BD mediums will not fail the READTOC command)
Add a test for the standard INQUIRY data. The iscsi/scsi target should complete
the request successfully for all values of buffersize/allocation_length
of 1 to 255 bytes.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Remove the test for accessing 0blocks (transfer length==0) at the end of the device since they were invalid.
SBC says that :
If the LBA plus the transfer length exceeds the capacity
of the medium, then the device server shall terminate the
command with CHECK CONDITION status with the sense key
set to ILLEGAL REQUEST and the additional sense code
set to LOGICAL BLOCK ADDRESS OUT OF RANGE.
This means that if TL==0 then a LBA that is the first LBA beyond the end of
device is actually valid.
Improve output for error conditions and harminize all tests
Beyondeol tests: Add missing checks for optional opcodes
to SKIP tests where the target does not implement the opcode.
Improve the error reporting and make sure we always show the Sense we
received from the target when we get an unexpected error.
Check the size of the LUN and skip the test for luns that are too big.
For example skip testing READ10 on LUNs > 2^31 blocks etc.
0171 is expecting a 0-block unmap at end-of-volume (i.e. start block
one beyond what READ CAPACITY returns) to pass, while every other 0blocks
test is expecting that address to be invalid.