TESTS: change testunitready to new api

Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
This commit is contained in:
Ronnie Sahlberg
2014-09-17 14:13:14 -07:00
committed by Ronnie Sahlberg
parent fe11a6178b
commit 3ee3964332
18 changed files with 87 additions and 150 deletions

View File

@@ -45,14 +45,15 @@ test_preventallow_cold_reset(void)
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Verify we can still access the media.");
ret = testunitready(iscsic, tgt_lun);
ret = testunitready(iscsic, tgt_lun,
EXPECT_STATUS_GOOD);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Perform cold reset on target");
ret = iscsi_task_mgmt_target_cold_reset_sync(iscsic);
logging(LOG_VERBOSE, "Wait until all unit attentions clear");
while (testunitready(iscsic, tgt_lun) != 0);
while (testunitready(iscsic, tgt_lun, EXPECT_STATUS_GOOD) != 0);
CU_ASSERT_EQUAL(ret, 0);
@@ -62,7 +63,8 @@ test_preventallow_cold_reset(void)
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Verify we can not access the media.");
ret = testunitready_nomedium(iscsic, tgt_lun);
ret = testunitready(iscsic, tgt_lun,
EXPECT_NO_MEDIUM);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Load the medium");