Skip to content

Commit

Permalink
tests: Fix poll_cq_ex function
Browse files Browse the repository at this point in the history
[ Upstream commit a4a7d80 ]

poll_cq_ex() function decrements the number of polled CQEs twice by
mistake. Fix the function to count correctly.

Fixes: 21134ab ("tests: Add timeout on polling completions")
Signed-off-by: Maxim Chicherin <maximc@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Signed-off-by: Nicolas Morey <nmorey@suse.com>
  • Loading branch information
Maxim Chicherin authored and nmorey committed Oct 7, 2024
1 parent 0a04ff3 commit f00b27f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ def poll_cq_ex(cqex, count=1, data=None, sgid=None):
if isinstance(cqex, EfaCQ):
if sgid is not None and cqex.read_opcode() == e.IBV_WC_RECV:
assert sgid.gid == cqex.read_sgid().gid
count -= 1
if count > 0:
raise PyverbsError(f'Got timeout on polling ({count} CQEs remaining)')
finally:
Expand Down

0 comments on commit f00b27f

Please sign in to comment.