temp: redo the write10/12/16 commands to the new saner api

Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
This commit is contained in:
Ronnie Sahlberg
2014-09-16 16:33:13 -07:00
committed by Ronnie Sahlberg
parent 8aefc7d579
commit 8ffd78c117
38 changed files with 269 additions and 921 deletions

View File

@@ -34,7 +34,8 @@ test_write16_0blocks(void)
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test WRITE16 0-blocks at LBA==0");
ret = write16(iscsic, tgt_lun, 0, 0, block_size,
0, 0, 0, 0, 0, NULL);
0, 0, 0, 0, 0, NULL,
EXPECT_STATUS_GOOD);
if (ret == -2) {
logging(LOG_NORMAL, "[SKIPPED] WRITE16 is not implemented.");
CU_PASS("WRITE16 is not implemented.");
@@ -43,19 +44,22 @@ test_write16_0blocks(void)
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test WRITE16 0-blocks one block past end-of-LUN");
ret = write16_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1, 0,
block_size, 0, 0, 0, 0, 0, NULL);
ret = write16(iscsic, tgt_lun, num_blocks + 1, 0,
block_size, 0, 0, 0, 0, 0, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test WRITE16 0-blocks at LBA==2^63");
ret = write16_lbaoutofrange(iscsic, tgt_lun, 0x8000000000000000ULL, 0,
block_size, 0, 0, 0, 0, 0, NULL);
ret = write16(iscsic, tgt_lun, 0x8000000000000000ULL, 0,
block_size, 0, 0, 0, 0, 0, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test WRITE16 0-blocks at LBA==-1");
ret = write16_lbaoutofrange(iscsic, tgt_lun, -1, 0, block_size,
0, 0, 0, 0, 0, NULL);
ret = write16(iscsic, tgt_lun, -1, 0, block_size,
0, 0, 0, 0, 0, NULL,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
}