test tool, RESERVE(6) tests: Avoid leaking 'iscsi2'
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
3fdc3f2327
commit
64e800a437
@@ -91,4 +91,8 @@ test_reserve6_2initiators(void)
|
||||
logging(LOG_NORMAL, "RELEASE6 from the second initiator");
|
||||
ret = release6(iscsic2, tgt_lun);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
iscsi_logout_sync(iscsic2);
|
||||
iscsi_destroy_context(iscsic2);
|
||||
iscsic2 = NULL;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ test_reserve6_itnexus_loss(void)
|
||||
iscsic = iscsi_context_login(initiatorname1, tgt_url, &tgt_lun);
|
||||
if (iscsic == NULL) {
|
||||
logging(LOG_VERBOSE, "Failed to login to target");
|
||||
return;
|
||||
goto finished;
|
||||
}
|
||||
|
||||
logging(LOG_NORMAL, "RESERVE6 from the second initiator should work now");
|
||||
@@ -76,4 +76,9 @@ test_reserve6_itnexus_loss(void)
|
||||
logging(LOG_NORMAL, "RELEASE6 from the second initiator");
|
||||
ret = release6(iscsic2, tgt_lun);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
finished:
|
||||
iscsi_logout_sync(iscsic2);
|
||||
iscsi_destroy_context(iscsic2);
|
||||
iscsic2 = NULL;
|
||||
}
|
||||
|
||||
@@ -73,4 +73,8 @@ test_reserve6_logout(void)
|
||||
logging(LOG_NORMAL, "RELEASE6 from the second initiator");
|
||||
ret = release6(iscsic2, tgt_lun);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
iscsi_logout_sync(iscsic2);
|
||||
iscsi_destroy_context(iscsic2);
|
||||
iscsic2 = NULL;
|
||||
}
|
||||
|
||||
@@ -69,4 +69,8 @@ test_reserve6_target_cold_reset(void)
|
||||
logging(LOG_VERBOSE, "RELEASE6 from the second initiator");
|
||||
ret = release6(iscsic2, tgt_lun);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
iscsi_logout_sync(iscsic2);
|
||||
iscsi_destroy_context(iscsic2);
|
||||
iscsic2 = NULL;
|
||||
}
|
||||
|
||||
@@ -71,4 +71,8 @@ test_reserve6_target_warm_reset(void)
|
||||
logging(LOG_VERBOSE, "RELEASE6 from the second initiator");
|
||||
ret = release6(iscsic2, tgt_lun);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
iscsi_logout_sync(iscsic2);
|
||||
iscsi_destroy_context(iscsic2);
|
||||
iscsic2 = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user