TESTS: update startstopunit to use new api
Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
28b0a0ab11
commit
f1d198c684
@@ -40,7 +40,8 @@ test_preventallow_eject(void)
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_VERBOSE, "Try to eject the medium");
|
||||
ret = startstopunit_preventremoval(iscsic, tgt_lun, 0, 0, 0, 0, 1, 0);
|
||||
ret = startstopunit(iscsic, tgt_lun, 0, 0, 0, 0, 1, 0,
|
||||
EXPECT_REMOVAL_PREVENTED);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_VERBOSE, "Verify we can still access the media.");
|
||||
@@ -52,7 +53,8 @@ test_preventallow_eject(void)
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_VERBOSE, "Try to eject the medium");
|
||||
ret = startstopunit(iscsic, tgt_lun, 0, 0, 0, 0, 1, 0);
|
||||
ret = startstopunit(iscsic, tgt_lun, 0, 0, 0, 0, 1, 0,
|
||||
EXPECT_STATUS_GOOD);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_VERBOSE, "Verify we can not access the media.");
|
||||
@@ -64,7 +66,8 @@ test_preventallow_eject(void)
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_VERBOSE, "Try to load the medium");
|
||||
ret = startstopunit_preventremoval(iscsic, tgt_lun, 0, 0, 0, 0, 1, 1);
|
||||
ret = startstopunit(iscsic, tgt_lun, 0, 0, 0, 0, 1, 1,
|
||||
EXPECT_REMOVAL_PREVENTED);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_VERBOSE, "Clear PREVENT flag");
|
||||
@@ -72,7 +75,8 @@ test_preventallow_eject(void)
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_VERBOSE, "Load the medium again");
|
||||
ret = startstopunit(iscsic, tgt_lun, 0, 0, 0, 0, 1, 1);
|
||||
ret = startstopunit(iscsic, tgt_lun, 0, 0, 0, 0, 1, 1,
|
||||
EXPECT_STATUS_GOOD);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user