Test: add helpers for reserve6/release6
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -44,14 +44,7 @@ test_reserve6_lun_reset(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Take out a RESERVE6 from the first initiator");
|
||||
ret = reserve6(sd);
|
||||
if (ret == -2) {
|
||||
logging(LOG_VERBOSE, "[SKIPPED] Target does not support RESERVE6. Skipping test");
|
||||
CU_PASS("[SKIPPED] Target does not support RESERVE6. Skipping test");
|
||||
return;
|
||||
}
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
RESERVE6(sd);
|
||||
|
||||
logging(LOG_VERBOSE, "Send a LUN Reset");
|
||||
ret = iscsi_task_mgmt_lun_reset_sync(sd->iscsi_ctx, sd->iscsi_lun);
|
||||
@@ -75,12 +68,10 @@ test_reserve6_lun_reset(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "RESERVE6 from the second initiator should work now");
|
||||
ret = reserve6(&sd2);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
RESERVE6(&sd2);
|
||||
|
||||
logging(LOG_VERBOSE, "RELEASE6 from the second initiator");
|
||||
ret = release6(&sd2);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
RELEASE6(&sd2);
|
||||
|
||||
iscsi_logout_sync(sd2.iscsi_ctx);
|
||||
iscsi_destroy_context(sd2.iscsi_ctx);
|
||||
|
||||
Reference in New Issue
Block a user