From f00b27f5018b63c41d35934bb55f009f50c1c992 Mon Sep 17 00:00:00 2001 From: Maxim Chicherin Date: Sun, 1 Sep 2024 16:08:28 +0300 Subject: [PATCH] tests: Fix poll_cq_ex function [ Upstream commit a4a7d809382c1b1b6b6368e54e79a1fb2bff5eb4 ] poll_cq_ex() function decrements the number of polled CQEs twice by mistake. Fix the function to count correctly. Fixes: 21134ab0cf16 ("tests: Add timeout on polling completions") Signed-off-by: Maxim Chicherin Signed-off-by: Edward Srouji Signed-off-by: Nicolas Morey --- tests/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 84bd39fc2..531f5938c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -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: