Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prov/efa/test: Use correct qp num in the mock #10390

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions prov/efa/test/efa_unit_test_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static void test_rdm_cq_read_bad_send_status(struct efa_resource *resource,
will_return(efa_mock_ibv_end_poll_check_mock, NULL);
will_return(efa_mock_ibv_read_opcode_return_mock, IBV_WC_SEND);
will_return(efa_mock_ibv_read_vendor_err_return_mock, vendor_error);
will_return(efa_mock_ibv_read_qp_num_return_mock, 0);
will_return(efa_mock_ibv_read_qp_num_return_mock, efa_rdm_ep->base_ep.qp->qp_num);
ret = fi_cq_read(resource->cq, &cq_entry, 1);
/* fi_cq_read() called efa_mock_ibv_start_poll_use_saved_send_wr(), which pulled one send_wr from g_ibv_submitted_wr_idv=_vec */
assert_int_equal(g_ibv_submitted_wr_id_cnt, 0);
Expand Down Expand Up @@ -317,7 +317,7 @@ void test_ibv_cq_ex_read_bad_recv_status(struct efa_resource **state)
* therefore use will_return_always()
*/
will_return_always(efa_mock_ibv_read_opcode_return_mock, IBV_WC_RECV);
will_return_always(efa_mock_ibv_read_qp_num_return_mock, 0);
will_return_always(efa_mock_ibv_read_qp_num_return_mock, efa_rdm_ep->base_ep.qp->qp_num);
will_return(efa_mock_ibv_read_vendor_err_return_mock, EFA_IO_COMP_STATUS_LOCAL_ERROR_UNRESP_REMOTE);
/* the recv error will not populate to application cq because it's an EFA internal error and
* and not related to any application recv. Currently we can only read the error from eq.
Expand Down Expand Up @@ -612,7 +612,7 @@ static void test_impl_ibv_cq_ex_read_unknow_peer_ah(struct efa_resource *resourc
will_return(efa_mock_ibv_read_slid_return_mock, 0xffff); // slid=0xffff(-1) indicates an unknown AH
will_return(efa_mock_ibv_read_byte_len_return_mock, pkt_entry->pkt_size);
will_return_maybe(efa_mock_ibv_read_opcode_return_mock, IBV_WC_RECV);
will_return_maybe(efa_mock_ibv_read_qp_num_return_mock, 0);
will_return_maybe(efa_mock_ibv_read_qp_num_return_mock, efa_rdm_ep->base_ep.qp->qp_num);
will_return_maybe(efa_mock_ibv_read_wc_flags_return_mock, 0);
will_return_maybe(efa_mock_ibv_read_src_qp_return_mock, raw_addr.qpn);

Expand Down
4 changes: 2 additions & 2 deletions prov/efa/test/efa_unit_test_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void test_efa_rdm_ep_handshake_exchange_host_id(struct efa_resource **state, uin
will_return(efa_mock_ibv_next_poll_check_function_called_and_return_mock, ENOENT);
will_return(efa_mock_ibv_read_byte_len_return_mock, pkt_entry->pkt_size);
will_return(efa_mock_ibv_read_opcode_return_mock, IBV_WC_RECV);
will_return(efa_mock_ibv_read_qp_num_return_mock, 0);
will_return(efa_mock_ibv_read_qp_num_return_mock, efa_rdm_ep->base_ep.qp->qp_num);
will_return(efa_mock_ibv_read_wc_flags_return_mock, 0);
will_return(efa_mock_ibv_read_slid_return_mock, efa_rdm_ep_get_peer_ahn(efa_rdm_ep, peer_addr));
will_return(efa_mock_ibv_read_src_qp_return_mock, raw_addr.qpn);
Expand All @@ -204,7 +204,7 @@ void test_efa_rdm_ep_handshake_exchange_host_id(struct efa_resource **state, uin
*/
will_return(efa_mock_ibv_end_poll_check_mock, NULL);
will_return(efa_mock_ibv_read_opcode_return_mock, IBV_WC_SEND);
will_return(efa_mock_ibv_read_qp_num_return_mock, 0);
will_return(efa_mock_ibv_read_qp_num_return_mock, efa_rdm_ep->base_ep.qp->qp_num);
will_return(efa_mock_ibv_read_vendor_err_return_mock, FI_EFA_ERR_OTHER);
will_return(efa_mock_ibv_start_poll_return_mock, IBV_WC_SUCCESS);

Expand Down
Loading