Tests: Add helpers for ExtendedCopy and ReceiveCopyResults

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2016-02-21 09:53:43 -08:00
parent 9afd4a4412
commit b01780b9ee
9 changed files with 60 additions and 118 deletions

View File

@@ -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);
}