Merge pull request #203 from sitsofe/mpath-initiator
Tests: Ensure each path sends a different initiator when using multipath
This commit is contained in:
@@ -765,6 +765,7 @@ int
|
|||||||
suite_init(void)
|
suite_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
char const *initiatornames[MPATH_MAX_DEVS] = { initiatorname1, initiatorname2 };
|
||||||
|
|
||||||
for (i = 0; i < mp_num_sds; i++) {
|
for (i = 0; i < mp_num_sds; i++) {
|
||||||
if (!mp_sds[i]->iscsi_url) {
|
if (!mp_sds[i]->iscsi_url) {
|
||||||
@@ -774,7 +775,7 @@ suite_init(void)
|
|||||||
iscsi_logout_sync(mp_sds[i]->iscsi_ctx);
|
iscsi_logout_sync(mp_sds[i]->iscsi_ctx);
|
||||||
iscsi_destroy_context(mp_sds[i]->iscsi_ctx);
|
iscsi_destroy_context(mp_sds[i]->iscsi_ctx);
|
||||||
}
|
}
|
||||||
mp_sds[i]->iscsi_ctx = iscsi_context_login(initiatorname1,
|
mp_sds[i]->iscsi_ctx = iscsi_context_login(initiatornames[i],
|
||||||
mp_sds[i]->iscsi_url,
|
mp_sds[i]->iscsi_url,
|
||||||
&mp_sds[i]->iscsi_lun);
|
&mp_sds[i]->iscsi_lun);
|
||||||
if (mp_sds[i]->iscsi_ctx == NULL) {
|
if (mp_sds[i]->iscsi_ctx == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user