TESTS: When task management functions fail, print the reason why it failed.

This commit is contained in:
Ronnie Sahlberg
2013-03-27 17:25:47 -07:00
parent aac7ed29b8
commit fbf58ead9f
4 changed files with 21 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ test_reserve6_lun_reset(void)
logging(LOG_VERBOSE, "Send a LUN Reset");
ret = iscsi_task_mgmt_lun_reset_sync(iscsic, tgt_lun);
if (ret != 0) {
logging(LOG_NORMAL, "LUN reset failed");
logging(LOG_NORMAL, "LUN reset failed. %s", iscsi_get_error(iscsic));
}
CU_ASSERT_EQUAL(ret, 0);

View File

@@ -48,7 +48,7 @@ test_reserve6_target_cold_reset(void)
logging(LOG_VERBOSE, "Send a Cold Reset to the target");
ret = iscsi_task_mgmt_target_cold_reset_sync(iscsic);
if (ret != 0) {
logging(LOG_NORMAL, "Cold reset failed");
logging(LOG_NORMAL, "Cold reset failed. %s", iscsi_get_error(iscsic));
}
CU_ASSERT_EQUAL(ret, 0);

View File

@@ -48,7 +48,7 @@ test_reserve6_target_warm_reset(void)
logging(LOG_VERBOSE, "Send a Warm Reset to the target");
ret = iscsi_task_mgmt_target_warm_reset_sync(iscsic);
if (ret != 0) {
logging(LOG_NORMAL, "Warm reset failed");
logging(LOG_NORMAL, "Warm reset failed. %s", iscsi_get_error(iscsic));
}
CU_ASSERT_EQUAL(ret, 0);