Skip to content

Commit

Permalink
fabtests/cq_data: relax CQ data validation to cq_data_size
Browse files Browse the repository at this point in the history
The provider only supports cq_data_size bytes of CQ data, thus the test
can only reliably verify the last cq_data_size*8 bits.

Signed-off-by: Wenduo Wang <wenduwan@amazon.com>
  • Loading branch information
wenduwan committed Sep 29, 2023
1 parent 35060d9 commit 3b0c5a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fabtests/functional/cq_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ static int run_test()
size_t size = 1000;
struct fi_cq_data_entry comp = {0};
struct fi_rma_iov remote;
uint64_t mask = -1;

if (fi->domain_attr->cq_data_size < sizeof(uint64_t))
mask ^= mask << (fi->domain_attr->cq_data_size * 8);

if (opts.cqdata_op == FT_CQDATA_WRITEDATA) {
ret = ft_exchange_keys(&remote);
Expand Down Expand Up @@ -87,7 +91,7 @@ static int run_test()
}

if (comp.flags & FI_REMOTE_CQ_DATA) {
if (comp.data == remote_cq_data) {
if ((comp.data & mask) == (remote_cq_data & mask)) {
fprintf(stdout, "remote_cq_data: success\n");
ret = 0;
} else {
Expand Down

0 comments on commit 3b0c5a6

Please sign in to comment.