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 <[email protected]>
Signed-off-by: Edward Srouji <[email protected]>
Signed-off-by: Nicolas Morey <[email protected]>
  • Loading branch information
Maxim Chicherin authored and nmorey committed Oct 7, 2024
1 parent 9cc6f8a commit 8013909
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 @@ -666,7 +666,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 8013909

Please sign in to comment.