-
Notifications
You must be signed in to change notification settings - Fork 389
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: Add unit tests for efa_msg #10632
Conversation
cmocka_unit_test_setup_teardown(test_efa_msg_fi_send, efa_unit_test_mocks_setup, efa_unit_test_mocks_teardown), | ||
cmocka_unit_test_setup_teardown(test_efa_msg_fi_sendv, efa_unit_test_mocks_setup, efa_unit_test_mocks_teardown), | ||
cmocka_unit_test_setup_teardown(test_efa_msg_fi_sendmsg, efa_unit_test_mocks_setup, efa_unit_test_mocks_teardown), | ||
cmocka_unit_test_setup_teardown(test_efa_msg_fi_senddata, efa_unit_test_mocks_setup, efa_unit_test_mocks_teardown), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to add tests for inject* calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how to test the inject as I am using FI_EP_DGRAM as the ep type right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easy thing: use FI_EP_RDM, but override your ep function table before you making the send/recv call.
// get ep from your ep_fid
(*ep)->msg = &efa_msg_ops;
(*ep)->rma = &efa_rma_ops;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should finally make DGRAM support inject after onboarding FI_CONTEXT2, you can do this override before that happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to make efa_msg_ops
as an external struct for your unit test to declare
Use FI_EP_RDM as ep type and override efa_msg_ops. Signed-off-by: Jessie Yang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Ideally we should add some more validation in the rdma-core level to make sure sge, imm data are set correctly, but that is likely beyond the scope of this PR. We will start from this one and explore that further validation as follow-ups. |
Add unit tests for efa_msg. Use FI_EP_RDM as ep type and override efa_msg_ops.