{"id":23287,"url":"https://patchwork.libcamera.org/api/1.1/patches/23287/?format=json","web_url":"https://patchwork.libcamera.org/patch/23287/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250428090413.38234-16-s.pueschel@pengutronix.de>","date":"2025-04-28T09:02:40","name":"[v11,15/19] lc-compliance: Add test to ensure MinimumRequests is valid","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"296513fc80a7e19487147f362276cb1078438750","submitter":{"id":225,"url":"https://patchwork.libcamera.org/api/1.1/people/225/?format=json","name":"Sven Püschel","email":"s.pueschel@pengutronix.de"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/23287/mbox/","series":[{"id":5148,"url":"https://patchwork.libcamera.org/api/1.1/series/5148/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5148","date":"2025-04-28T09:02:25","name":"lc-compliance: Add test to queue more requests than hardware depth","version":11,"mbox":"https://patchwork.libcamera.org/series/5148/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23287/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23287/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 44B9CC3327\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Apr 2025 09:05:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6BCDC68B27;\n\tMon, 28 Apr 2025 11:05:37 +0200 (CEST)","from metis.whiteo.stw.pengutronix.de\n\t(metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C56AE68B24\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Apr 2025 11:05:08 +0200 (CEST)","from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77]\n\thelo=peter.guest.stw.pengutronix.de)\n\tby metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92)\n\t(envelope-from <s.pueschel@pengutronix.de>)\n\tid 1u9KQG-0001au-Aa; Mon, 28 Apr 2025 11:05:08 +0200"],"From":"=?utf-8?q?Sven_P=C3=BCschel?= <s.pueschel@pengutronix.de>","To":"libcamera-devel@lists.libcamera.org","Cc":"=?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>, \n\tUmang Jain <umang.jain@ideasonboard.com>, =?utf-8?q?Sven_P=C3=BCschel?=\n\t<s.pueschel@pengutronix.de>","Subject":"[PATCH v11 15/19] lc-compliance: Add test to ensure MinimumRequests\n\tis valid","Date":"Mon, 28 Apr 2025 11:02:40 +0200","Message-ID":"<20250428090413.38234-16-s.pueschel@pengutronix.de>","X-Mailer":"git-send-email 2.49.0","In-Reply-To":"<20250428090413.38234-1-s.pueschel@pengutronix.de>","References":"<20250428090413.38234-1-s.pueschel@pengutronix.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-SA-Exim-Connect-IP":"2a0a:edc0:0:900:1d::77","X-SA-Exim-Mail-From":"s.pueschel@pengutronix.de","X-SA-Exim-Scanned":"No (on metis.whiteo.stw.pengutronix.de);\n\tSAEximRunCond expanded to false","X-PTX-Original-Recipient":"libcamera-devel@lists.libcamera.org","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Nícolas F. R. A. Prado <nfraprado@collabora.com>\n\nAdd a test in lc-compliance to check that the MinimumRequests property\nis set and valid, that is, greater than 0.\n\nSigned-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nSigned-off-by: Sven Püschel <s.pueschel@pengutronix.de>\n\n---\nChanges in v11:\n- rebased\n\nNo change in v10\n\nChanges in v9:\n- rebased\n\nChanges in v8:\n- Moved RequiredProperties test to property_test.cpp\n- Moved CameraTests to new test_base.{cpp,h} files\n\nChanges in v7:\n- New\n---\n src/apps/lc-compliance/meson.build       |  1 +\n src/apps/lc-compliance/property_test.cpp | 24 ++++++++++++++++++++++++\n src/apps/lc-compliance/test_base.cpp     | 10 ++++++++++\n src/apps/lc-compliance/test_base.h       |  7 +++++++\n 4 files changed, 42 insertions(+)\n create mode 100644 src/apps/lc-compliance/property_test.cpp","diff":"diff --git a/src/apps/lc-compliance/meson.build b/src/apps/lc-compliance/meson.build\nindex 80b9a160..fb020b48 100644\n--- a/src/apps/lc-compliance/meson.build\n+++ b/src/apps/lc-compliance/meson.build\n@@ -15,6 +15,7 @@ lc_compliance_sources = files([\n     'environment.cpp',\n     'helpers/capture.cpp',\n     'main.cpp',\n+    'property_test.cpp',\n     'test_base.cpp',\n     'tests/capture_test.cpp',\n ])\ndiff --git a/src/apps/lc-compliance/property_test.cpp b/src/apps/lc-compliance/property_test.cpp\nnew file mode 100644\nindex 00000000..6a0951b2\n--- /dev/null\n+++ b/src/apps/lc-compliance/property_test.cpp\n@@ -0,0 +1,24 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2021, Collabora Ltd.\n+ *\n+ * property_test.cpp - Test camera properties\n+ */\n+\n+#include <libcamera/libcamera.h>\n+\n+#include <gtest/gtest.h>\n+\n+#include \"test_base.h\"\n+\n+using namespace libcamera;\n+\n+TEST_F(CameraTests, RequiredProperties)\n+{\n+\tconst ControlList &properties = camera_->properties();\n+\n+\tusing namespace properties;\n+\n+\tEXPECT_GT(properties.get(MinimumRequests), 0)\n+\t\t<< \"Camera should have a positive value for MinimumRequests property\";\n+}\ndiff --git a/src/apps/lc-compliance/test_base.cpp b/src/apps/lc-compliance/test_base.cpp\nindex c9957b9e..a5e64c8b 100644\n--- a/src/apps/lc-compliance/test_base.cpp\n+++ b/src/apps/lc-compliance/test_base.cpp\n@@ -26,3 +26,13 @@ void CameraHolder::releaseCamera()\n \tcamera_->release();\n \tcamera_.reset();\n }\n+\n+void CameraTests::SetUp()\n+{\n+\tacquireCamera();\n+}\n+\n+void CameraTests::TearDown()\n+{\n+\treleaseCamera();\n+}\ndiff --git a/src/apps/lc-compliance/test_base.h b/src/apps/lc-compliance/test_base.h\nindex 52347749..8125e1c6 100644\n--- a/src/apps/lc-compliance/test_base.h\n+++ b/src/apps/lc-compliance/test_base.h\n@@ -21,4 +21,11 @@ protected:\n \tstd::shared_ptr<libcamera::Camera> camera_;\n };\n \n+class CameraTests : public ::testing::Test, public CameraHolder\n+{\n+protected:\n+\tvoid SetUp() override;\n+\tvoid TearDown() override;\n+};\n+\n #endif /* __LC_COMPLIANCE_TEST_BASE_H__ */\n","prefixes":["v11","15/19"]}