Skip to content

Commit

Permalink
prov/cxi: Add test for invalid client RKEY
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Ziemba <[email protected]>
  • Loading branch information
iziemba authored and j-xiong committed Nov 13, 2024
1 parent 4feb9c3 commit 50b9a42
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions prov/cxi/test/mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ Test(mr, invalid_fi_directed_recv_flag)
cr_assert_eq(ret, -FI_EINVAL, "fi_mr_regattr failed: %d", ret);
}

Test(mr, invalid_client_rkey)
{
int ret;
struct fi_mr_attr attr = {};
struct iovec iov = {};
struct fid_mr *mr;

iov.iov_len = sizeof(ret);
iov.iov_base = (void *)&ret;

attr.mr_iov = &iov;
attr.iov_count = 1;
attr.access = FI_REMOTE_READ | FI_REMOTE_WRITE;
attr.requested_key = ~1;

ret = fi_mr_regattr(cxit_domain, &attr, 0, &mr);
cr_assert_eq(ret, -FI_EKEYREJECTED, "fi_mr_regattr failed: %d", ret);
}

Test(mr, std_mrs, .timeout = 600, .disabled = true)
{
int std_mr_cnt = 16*1024;
Expand Down

0 comments on commit 50b9a42

Please sign in to comment.