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

View File

@@ -31,18 +31,11 @@ test_preventallow_warm_reset(void)
CHECK_FOR_SBC;
CHECK_FOR_REMOVABLE;
CHECK_FOR_ISCSI(sd);
logging(LOG_VERBOSE, LOG_BLANK_LINE);
logging(LOG_VERBOSE, "Test that Target Warm Reset clears PREVENT MEDIUM REMOVAL");
if (sd->iscsi_ctx == NULL) {
const char *err = "[SKIPPED] This PREVENTALLOW test is "
"only supported for iSCSI backends";
logging(LOG_NORMAL, "%s", err);
CU_PASS(err);
return;
}
logging(LOG_VERBOSE, "Set the PREVENT flag");
PREVENTALLOW(sd, 1);