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 7062c02 commit 3186af4
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 @@ -608,7 +608,6 @@ def poll_cq_ex(cqex, count=1, data=None):
format(s=cqex.status))
if data:
assert data == socket.ntohl(cqex.read_imm_data())
count -= 1
if count > 0:
raise PyverbsError(f'Got timeout on polling ({count} CQEs remaining)')
finally:
Expand Down

0 comments on commit 3186af4

Please sign in to comment.