Tests: Add helper macros for Write*

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2016-02-20 19:33:02 -08:00
parent bd29dab95b
commit eba1ac059a
29 changed files with 252 additions and 493 deletions

View File

@@ -250,10 +250,8 @@ test_write16_residuals(void)
logging(LOG_VERBOSE, "Write two blocks of 'a'");
memset(buf, 'a', 10000);
ret = write16(sd, 0, 2 * block_size,
block_size, 0, 0, 0, 0, 0, buf,
EXPECT_STATUS_GOOD);
CU_ASSERT_EQUAL(ret, 0);
WRITE16(sd, 0, 2 * block_size, block_size, 0, 0, 0, 0, 0, buf,
EXPECT_STATUS_GOOD);
logging(LOG_VERBOSE, "Write one block of 'b' but set iSCSI EDTL to 2 blocks.");
task = malloc(sizeof(struct scsi_task));
@@ -326,10 +324,8 @@ test_write16_residuals(void)
logging(LOG_VERBOSE, "Write two blocks of 'a'");
memset(buf, 'a', 10000);
ret = write16(sd, 0, 2 * block_size,
block_size, 0, 0, 0, 0, 0, buf,
EXPECT_STATUS_GOOD);
CU_ASSERT_EQUAL(ret, 0);
WRITE16(sd, 0, 2 * block_size, block_size, 0, 0, 0, 0, 0, buf,
EXPECT_STATUS_GOOD);
logging(LOG_VERBOSE, "Write two blocks of 'b' but set iSCSI EDTL to 1 blocks.");
task = malloc(sizeof(struct scsi_task));