test-tool: add prin_read_keys() allocation_len parameter
Accepting an Allocation Length parameter allows us to test for truncation of response data, as per SPC5r17 4.2.5.6: The device server shall terminate transfers to the Data-In Buffer when the number of bytes or blocks specified by the ALLOCATION LENGTH field have been transferred or when all available data have been transferred, whichever is less. With this change, all existing prin_read_keys() callers continue to use same ALLOCATION LENGTH value as earlier (16K). Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
@@ -38,11 +38,11 @@ test_prin_serviceaction_range(void)
|
||||
logging(LOG_VERBOSE, "Test Persistent Reserve IN Serviceaction range.");
|
||||
|
||||
/* verify PRIN/READ_KEYS works -- XXX redundant -- remove this? */
|
||||
ret = prin_read_keys(sd, &task, NULL);
|
||||
ret = prin_read_keys(sd, &task, NULL, 16384);
|
||||
if (ret == -2) {
|
||||
CU_PASS("PERSISTENT RESERVE IN is not implemented.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
/* verify that PRIN/SA={0,1,2,3} works ... */
|
||||
|
||||
Reference in New Issue
Block a user