TESTS: For the inquiry test for whether a target only looks at the low

order byte of the two byte transfer length field or not.
Since the maximum size of a std vpd page takes 260 bytes to transfer
and some targets send this much,  testing and comparing the returned buffer
between allocation length == 255 and == 256 doesnt work.
Instead change test to verify that allocation length 511 and 512 returns the same amount and content of data.

This test then still allows finding targets that only look at the low order byte
(which is 0xff for 511   but is 0 for 512)
This commit is contained in:
Ronnie Sahlberg
2013-05-29 19:21:39 -07:00
parent b5a31571dc
commit c9a01c4c1f

View File

@@ -79,7 +79,12 @@ test_inquiry_alloc_length(void)
}
logging(LOG_VERBOSE, "Version is SPC-3 or later. Read INQUIRY data using 16-bit allocation length");
ret = inquiry(iscsic, tgt_lun, 0, 0, 256, &task2);
logging(LOG_VERBOSE, "Read INQUIRY data with allocation length 511 (low order byte is 0xff)");
ret = inquiry(iscsic, tgt_lun, 0, 0, 511, &task);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Read INQUIRY data with allocation length 512 (low order byte is 0x00)");
ret = inquiry(iscsic, tgt_lun, 0, 0, 512, &task2);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "INQUIRY data should be the same when allocation length is 255 and 256 bytes");