TEST: INQUIRY, request 260 bytes of data when reading the standard VPD page.
This is the maximum possible size of this page. Previouslly we only read the arbitrary 255 bytes of page, but for targets that return >255 bytes of data this would then incorrectly make the test fail since the data-in buffer was truncated and thus the inq->additional_length no longer matched up with the datain buffer size. Now reading up to 260 bytes will avoid the datain buffer from ever becomming truncated, and as a second feature also make sure to test that the target understands > 8-bit values for the allocation length in the request.
This commit is contained in:
@@ -34,7 +34,8 @@ test_inquiry_standard(void)
|
||||
logging(LOG_VERBOSE, "Test of the standard INQUIRY page");
|
||||
|
||||
logging(LOG_VERBOSE, "Verify we can read standard INQUIRY page");
|
||||
ret = inquiry(iscsic, tgt_lun, 0, 0, 255, &task);
|
||||
/* 260 bytes is the maximum possible size of the standard vpd */
|
||||
ret = inquiry(iscsic, tgt_lun, 0, 0, 260, &task);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_VERBOSE, "Verify we got at least 36 bytes of data");
|
||||
|
||||
Reference in New Issue
Block a user