test-tool: use CHECK_FOR_ISCSI() helper macro

This removes a large amount of boilerplate code.

Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
David Disseldorp
2019-09-18 16:19:29 +02:00
parent 2600e538d8
commit e716691a45
41 changed files with 58 additions and 382 deletions
+1 -7
View File
@@ -38,13 +38,7 @@ test_read10_invalid(void)
logging(LOG_VERBOSE, "Test invalid READ10 commands");
logging(LOG_VERBOSE, "Block size is %zu", block_size);
if (sd->iscsi_ctx == NULL) {
const char *err = "[SKIPPED] This READ10 test is only "
"supported for iSCSI backends";
logging(LOG_NORMAL, "%s", err);
CU_PASS(err);
return;
}
CHECK_FOR_ISCSI(sd);
/* Try a read10 of 1 block but xferlength == 0 */
task = malloc(sizeof(struct scsi_task));