Skip to content

Commit 1d8866a

Browse files
aingersonj-xiong
authored andcommitted
[v2.3.x] fabtests/multi_ep: fix fi_info usage
In the RDM case of the multi_ep test, the test calls fi_getinfo again for each EP in order to override the source address. The source address was getting set as the node for the new call but the FI_SOURCE flag was not set meaning the local source address was getting resolved into the dst_addr which was never used anyway. This removes the node parameter with the source address to let the provider set a source address for us. This also fixes an issue on cleanup if one of the calls to getinfo fails, the test would try to cleanup the resources and would segfault because the fi is NULL. Signed-off-by: Alexia Ingerson <[email protected]> (cherry picked from commit 1a749cb)
1 parent 4db0b36 commit 1d8866a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fabtests/functional/multi_ep.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ static void free_ep_res()
7272
int i;
7373

7474
for (i = 0; i < num_eps; i++) {
75+
if (!fi)
76+
continue;
77+
7578
if (fi->domain_attr->mr_mode & FI_MR_RAW)
7679
(void) fi_mr_unmap_key(domain, peer_iovs[i].key);
7780

@@ -473,7 +476,7 @@ static int setup_av_ep(int idx)
473476
hints->src_addr = NULL;
474477
hints->src_addrlen = 0;
475478

476-
ret = fi_getinfo(FT_FIVERSION, opts.src_addr, NULL, 0, hints, &fi);
479+
ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi);
477480
if (ret) {
478481
FT_PRINTERR("fi_getinfo", ret);
479482
return ret;

0 commit comments

Comments
 (0)