Tests: Add helpers for ExtendedCopy and ReceiveCopyResults
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
void
|
||||
test_extendedcopy_validate_seg_descr(void)
|
||||
{
|
||||
int ret;
|
||||
int tgt_desc_len = 0, seg_desc_len = 0, offset = XCOPY_DESC_OFFSET;
|
||||
struct iscsi_data data;
|
||||
unsigned char *xcopybuf;
|
||||
@@ -58,13 +57,7 @@ test_extendedcopy_validate_seg_descr(void)
|
||||
populate_param_header(xcopybuf, 1, 0, 0, 0,
|
||||
tgt_desc_len, seg_desc_len, 0);
|
||||
|
||||
ret = extendedcopy(sd, &data, EXPECT_COPY_ABORTED);
|
||||
if (ret == -2) {
|
||||
CU_PASS("[SKIPPED] Target does not support "
|
||||
"EXTENDED_COPY. Skipping test");
|
||||
return;
|
||||
}
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
EXTENDEDCOPY(sd, &data, EXPECT_COPY_ABORTED);
|
||||
|
||||
logging(LOG_VERBOSE,
|
||||
"Number of copy blocks beyond destination block device capacity");
|
||||
@@ -80,6 +73,5 @@ test_extendedcopy_validate_seg_descr(void)
|
||||
populate_param_header(xcopybuf, 1, 0, 0, 0,
|
||||
tgt_desc_len, seg_desc_len, 0);
|
||||
|
||||
ret = extendedcopy(sd, &data, EXPECT_COPY_ABORTED);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
EXTENDEDCOPY(sd, &data, EXPECT_COPY_ABORTED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user