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:
@@ -186,6 +186,16 @@ do { \
|
|||||||
} \
|
} \
|
||||||
} while (0);
|
} 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) \
|
#define CHECK_SIZE(_min_blocks, _c) \
|
||||||
do { \
|
do { \
|
||||||
if (num_blocks < _min_blocks) { \
|
if (num_blocks < _min_blocks) { \
|
||||||
|
|||||||
Reference in New Issue
Block a user