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:
@@ -78,7 +78,7 @@ test_prout_preempt_rm_reg(void)
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
/* confirm that k1 and k2 are registered */
|
||||
ret = prin_read_keys(sd, &tsk, &rk);
|
||||
ret = prin_read_keys(sd, &tsk, &rk, 16384);
|
||||
CU_ASSERT_EQUAL_FATAL(ret, 0);
|
||||
|
||||
CU_ASSERT_EQUAL(rk->num_keys, 2);
|
||||
@@ -99,7 +99,7 @@ test_prout_preempt_rm_reg(void)
|
||||
ret = test_iscsi_tur_until_good(sd2, &num_uas);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
ret = prin_read_keys(sd, &tsk, &rk);
|
||||
ret = prin_read_keys(sd, &tsk, &rk, 16384);
|
||||
CU_ASSERT_EQUAL_FATAL(ret, 0);
|
||||
|
||||
CU_ASSERT_EQUAL(rk->num_keys, 1);
|
||||
|
||||
Reference in New Issue
Block a user