From patchwork Fri May 27 14:44:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16090 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 5D112BD161 for ; Fri, 27 May 2022 14:45:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C99636564E; Fri, 27 May 2022 16:45:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653662731; bh=H/Jb8v2zc35+zHkHqMvpT5G28m2rg6O/MIcSOu1mjLo=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=mQA4iUZ11tNCHCLTPciYZYErv99z0C3wZHtC8nuDFEqpd//tRWg4xjnVONusd2Dhf ccmWCH+vThcVhB2HwikMjoyruHRCGAjiOSvizU6O3vpusHNLSNEUJ8shHqRLd0EUQv 8lJO3jJjhbhXtu+KsW4CDHUh6eG0UqXvmn48bLpeTcv/tCYJNLhU9wy+aKH2jJIdSZ ipkM6lEr9anaUjC3sXHCOtuC9/95/FjYIu5homC+LbRfr861SHC6Cmw8vZ6QIdi6ZS mkfhCDPYcWoWOaxHT3HWnPa3y0Ej5iXqO1LyfAxrSOXFvb0B0Qe/WcLOXHUELg7oHB HS3yeDikkO77w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C7E5465651 for ; Fri, 27 May 2022 16:45:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="D82FgnI2"; dkim-atps=neutral Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B4A33C16; Fri, 27 May 2022 16:45:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653662713; bh=H/Jb8v2zc35+zHkHqMvpT5G28m2rg6O/MIcSOu1mjLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D82FgnI2vMm6k3pKCA4HJC1aTI2CsuOBFnejOn1Ek2ac36eTp3Tvo05wkJDhcOOLU iaXg3pePMBgUQs9DLmf93FcYqDjCpduqwchXJOrFTSPGHaIFUb9IM7NMEyrNy99GnK Y/cpT+j/77vyxEwfOh//Sm0t3wvaHmPyZFODcYQg= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Fri, 27 May 2022 17:44:35 +0300 Message-Id: <20220527144447.94891-19-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220527144447.94891-1-tomi.valkeinen@ideasonboard.com> References: <20220527144447.94891-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 18/30] py: unittests: Fix test_select() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The test_select() current uses self.assertTrue(len(ready_reqs) > 0) to see that cm.get_ready_requests() returns something. This is not always the case, as there may be two eventfd events queued, and the first call to cm.get_ready_requests() returns all the requests, and thus the second call returns none. Remove the self.assertTrue(len(ready_reqs) > 0) assert. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- test/py/unittests.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/py/unittests.py b/test/py/unittests.py index 45b35223..33b35a0a 100755 --- a/test/py/unittests.py +++ b/test/py/unittests.py @@ -287,8 +287,6 @@ class SimpleCaptureMethods(CameraTesterBase): ready_reqs = cm.get_ready_requests() - self.assertTrue(len(ready_reqs) > 0) - reqs += ready_reqs if len(reqs) == num_bufs: