From patchwork Mon May 30 14:27:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16109 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 D792DC326D for ; Mon, 30 May 2022 14:27:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2FB3B65644; Mon, 30 May 2022 16:27:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653920864; bh=WH3FanN0B7wtHyKVOVazV8b7jBn/0LRb+mJc3K8kM9A=; 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=hzyZOpwHoYYYylz/WBBam5S9DdLRlgp7+laoKs99oUnV8tYZ4WV++cyhTyDWc7g4G Tfs4pnNDFdAmP1r0I2TjHpmhXYROwegJ9qAODMe8cC4j59FyF8IBv0nWHh3FcL+Sd4 IrHPFEcnFa2c5NsfaxA5d43qHPgPSLnUwqczaVTHga5ecp4VUwUsCXL9+KnNjlS9uh MGrkitctNLr0CxAiyYadTVvsYJlos4dMv+uEjMJHMK2j4spOpuLmj1zORQjqO0WJ4G +xoOemxX3hUA4dKVyQui6n4yc7qJ11LwXNPilbSv3Hg7Dd17afiTR9oJOBilwmH9ec 9VsR24AJt60KA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4718360411 for ; Mon, 30 May 2022 16:27:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nfky05ho"; 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 AC154E57; Mon, 30 May 2022 16:27:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653920860; bh=WH3FanN0B7wtHyKVOVazV8b7jBn/0LRb+mJc3K8kM9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nfky05hofx59QsDJIDBnXisd7kSrYb+rWxSXAtjkDhmBNG6jy0CZk5Xy6C2Nf8EGl kRwf2wk98PeGG/0m/DDTRY/DyAJNEi5SMyW9iexitrpWRd0KAEgRSyf88zIOvL4mdb BjVnIKABLFh3APqhCJ8XbxjNKvqnOLzFWO3gTHwU= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Mon, 30 May 2022 17:27:08 +0300 Message-Id: <20220530142722.57618-3-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220530142722.57618-1-tomi.valkeinen@ideasonboard.com> References: <20220530142722.57618-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 02/16] 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() currently 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: