TESTS: Flag a whole bunch of tests as not supported on non-iSCSI backends

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2014-09-27 08:58:24 -07:00
parent abbf9a11b0
commit 45d87238e2
35 changed files with 384 additions and 24 deletions

View File

@@ -34,7 +34,7 @@ test_read6_simple(void)
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test READ6 of 1-255 blocks at the start of the LUN");
for (i = 1; i <= 255; i++) {
ret = read6(sd, 0, i * block_size,
ret = read6(sd, NULL, 0, i * block_size,
block_size, NULL,
EXPECT_STATUS_GOOD);
if (ret == -2) {
@@ -51,7 +51,7 @@ test_read6_simple(void)
CU_PASS("LUN is too big for read-at-eol tests with READ6. Skipping test.\n");
} else {
for (i = 1; i <= 255; i++) {
ret = read6(sd, num_blocks - i,
ret = read6(sd, NULL, num_blocks - i,
i * block_size, block_size, NULL,
EXPECT_STATUS_GOOD);
CU_ASSERT_EQUAL(ret, 0);
@@ -64,11 +64,12 @@ test_read6_simple(void)
logging(LOG_VERBOSE, "Test sending a READ6 with transfer length == 0 "
"(meaning 256 blocks)");
/* 256 is converted to 0 when the CDB is marshalled by the helper */
task = iscsi_read6_sync(sd->iscsi_ctx, sd->iscsi_lun, 0,
256 * block_size, block_size);
ret = read6(sd, &task, 0,
256 * block_size, block_size, NULL,
EXPECT_STATUS_GOOD);
if (task->status != SCSI_STATUS_GOOD) {
logging(LOG_NORMAL, "[FAILED] READ6 command: "
"failed with sense. %s", iscsi_get_error(sd->iscsi_ctx));
"failed with sense. %s", sd->error_str );
}
CU_ASSERT_EQUAL(task->status, SCSI_STATUS_GOOD);