TESTS: Abort the cold/warm reset tests if the target support is missing.
Not all targets support cold/warm reset task management functions. Abort these tests if the support is missing and the commands fail. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -57,7 +57,13 @@ test_preventallow_cold_reset(void)
|
|||||||
|
|
||||||
logging(LOG_VERBOSE, "Perform cold reset on target");
|
logging(LOG_VERBOSE, "Perform cold reset on target");
|
||||||
ret = iscsi_task_mgmt_target_cold_reset_sync(sd->iscsi_ctx);
|
ret = iscsi_task_mgmt_target_cold_reset_sync(sd->iscsi_ctx);
|
||||||
CU_ASSERT_EQUAL(ret, 0);
|
if (ret != 0) {
|
||||||
|
const char *err = "[SKIPPED] Task Management function"
|
||||||
|
"for ColdReset is not working/implemented\n";
|
||||||
|
logging(LOG_NORMAL, "%s", err);
|
||||||
|
CU_PASS(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
logging(LOG_VERBOSE, "Wait until all unit attentions clear");
|
logging(LOG_VERBOSE, "Wait until all unit attentions clear");
|
||||||
while (testunitready(sd, EXPECT_STATUS_GOOD) != 0)
|
while (testunitready(sd, EXPECT_STATUS_GOOD) != 0)
|
||||||
|
|||||||
@@ -57,7 +57,14 @@ test_preventallow_warm_reset(void)
|
|||||||
|
|
||||||
logging(LOG_VERBOSE, "Perform warm reset on target");
|
logging(LOG_VERBOSE, "Perform warm reset on target");
|
||||||
ret = iscsi_task_mgmt_target_warm_reset_sync(sd->iscsi_ctx);
|
ret = iscsi_task_mgmt_target_warm_reset_sync(sd->iscsi_ctx);
|
||||||
CU_ASSERT_EQUAL(ret, 0);
|
if (ret != 0) {
|
||||||
|
const char *err = "[SKIPPED] Task Management function"
|
||||||
|
"for WarmReset is not working/implemented\n";
|
||||||
|
logging(LOG_NORMAL, "%s", err);
|
||||||
|
CU_PASS(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
logging(LOG_VERBOSE, "Wait until all unit attentions clear");
|
logging(LOG_VERBOSE, "Wait until all unit attentions clear");
|
||||||
while (testunitready(sd, EXPECT_STATUS_GOOD) != 0)
|
while (testunitready(sd, EXPECT_STATUS_GOOD) != 0)
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user