test-tool: add CHECK_FOR_ISCSI() test filter macro

Skip the test if the provided iscsi_ctx is null.

Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
David Disseldorp
2019-09-18 16:17:20 +02:00
parent 1511ddcbe4
commit 2600e538d8

View File

@@ -186,6 +186,16 @@ do { \
} \
} while (0);
#define CHECK_FOR_ISCSI(_sd) \
do { \
if (_sd->iscsi_ctx == NULL) { \
logging(LOG_NORMAL, "[SKIPPED] Not an iSCSI device." \
" Skipping test"); \
CU_PASS("[SKIPPED] Not an iSCSI device. Skipping test"); \
return; \
} \
} while (0);
#define CHECK_SIZE(_min_blocks, _c) \
do { \
if (num_blocks < _min_blocks) { \