TESTS: update writesame tests to new API

Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
This commit is contained in:
Ronnie Sahlberg
2014-09-17 10:07:10 -07:00
committed by Ronnie Sahlberg
parent d3f98dfdd5
commit 8585e4509b
20 changed files with 179 additions and 653 deletions

View File

@@ -41,8 +41,8 @@ test_writesame10_0blocks(void)
logging(LOG_VERBOSE, "Test WRITESAME10 0-blocks at LBA==0 (WSNZ=%d)",
inq_bl->wsnz);
ret = writesame10(iscsic, tgt_lun, 0,
block_size, 0,
0, 0, 0, 0, buf);
block_size, 0, 0, 0, 0, 0, buf,
EXPECT_STATUS_GOOD);
if (ret == -2) {
CU_PASS("[SKIPPED] Target does not support WRITESAME10. Skipping test");
return;
@@ -59,22 +59,22 @@ test_writesame10_0blocks(void)
}
logging(LOG_VERBOSE, "Test WRITESAME10 0-blocks one block past end-of-LUN");
ret = writesame10_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1,
block_size, 0,
0, 0, 0, 0, buf);
ret = writesame10(iscsic, tgt_lun, num_blocks + 1,
block_size, 0, 0, 0, 0, 0, buf,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test WRITESAME10 0-blocks at LBA==2^31");
ret = writesame10_lbaoutofrange(iscsic, tgt_lun, 0x80000000,
block_size, 0,
0, 0, 0, 0, buf);
ret = writesame10(iscsic, tgt_lun, 0x80000000,
block_size, 0, 0, 0, 0, 0, buf,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test WRITESAME10 0-blocks at LBA==-1");
ret = writesame10_lbaoutofrange(iscsic, tgt_lun, -1,
block_size, 0,
0, 0, 0, 0, buf);
ret = writesame10(iscsic, tgt_lun, -1,
block_size, 0, 0, 0, 0, 0, buf,
EXPECT_LBA_OOB);
CU_ASSERT_EQUAL(ret, 0);
}