Patch Detail
Show a patch.
GET /api/patches/16695/?format=api
{ "id": 16695, "url": "https://patchwork.libcamera.org/api/patches/16695/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16695/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20220719213314.11717-1-laurent.pinchart@ideasonboard.com>", "date": "2022-07-19T21:33:13", "name": "[libcamera-devel,3/2] test: control_list: Use get() to test for control presence", "commit_ref": "b0b66214892ff566c0f4342bb28eaacb1cfa8d68", "pull_url": null, "state": "accepted", "archived": false, "hash": "de60bf52ea67d8e9a0d94cc74d7c75041aa7426e", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16695/mbox/", "series": [ { "id": 3304, "url": "https://patchwork.libcamera.org/api/series/3304/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3304", "date": "2022-07-19T21:02:57", "name": "[libcamera-devel,1/2] licamera: controls: Drop unnecessary template qualifiers in documentation", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3304/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16695/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16695/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 C48B8BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Jul 2022 21:33:54 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DC27463315;\n\tTue, 19 Jul 2022 23:33:53 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6713C603F4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Jul 2022 23:33:52 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C715E6EE;\n\tTue, 19 Jul 2022 23:33:51 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658266433;\n\tbh=DVoD73zdvZrY7noMQ4ePjUlWxuFH19HP45H8FN07T1c=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=xWv8/ziKzbjv4pfzLcr7XxEB9JCUX4JtJFixuVVMfykSrffetDLQKkK9yqYLxHz+i\n\t6aLdHN4hKu0wiA+KtqURpIYUfI/TiSdalr27LRfhOEG/Jciyq5ETUGrlX1y+yAt8BZ\n\tKkDcZEdjMXud11nVwQCpGLxRCEyRhaIqamzx9LHPccTsvKsUdjbhjZJMMCLRmA3yWM\n\tThoxHwSyTXQ854kt99bXBCunMyh7Dbb9f6v7FzQzk7Qg5WSe+tDcxNv+/Z8BYh6kAT\n\tlheII3gA5TBKe/doxFk9uD87El5M4/zXhV/faFGvWcMT8r0zfELDCa/JUi6NwQru9h\n\tzOr6DXOHrpWgA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658266432;\n\tbh=DVoD73zdvZrY7noMQ4ePjUlWxuFH19HP45H8FN07T1c=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=L2STuPsdQjosOzyxjuUArnvv38+EeM/QvYKy7gsL2cY45mxp9OKIxL0nv/MD8u9IT\n\tMm02gD18zgPOZHAOGLRFWvKXx+SH+pI77LMAqIQZGjvIRzqLMCP+bLAs74O9yALmgh\n\t9j/4NAf/rdiiTcYGA/AmvDqQ+MWh5ib1v+QANet8=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"L2STuPsd\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 20 Jul 2022 00:33:13 +0300", "Message-Id": "<20220719213314.11717-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220719210258.5602-1-laurent.pinchart@ideasonboard.com>", "References": "<20220719210258.5602-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 3/2] test: control_list: Use get() to test\n\tfor control presence", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Now that the ControlList::get() function returns an std::optional<>, it\nis the preferred way to test if a control is present in a ControlList.\nUse it in the test to prepare for removal of ControlList::contains().\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/controls/control_list.cpp | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)", "diff": "diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp\nindex 70cf61b85cbc..c03f230e0a12 100644\n--- a/test/controls/control_list.cpp\n+++ b/test/controls/control_list.cpp\n@@ -50,7 +50,7 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (list.contains(controls::Brightness)) {\n+\t\tif (list.get(controls::Brightness)) {\n \t\t\tcout << \"List should not contain Brightness control\" << endl;\n \t\t\treturn TestFail;\n \t\t}\n@@ -80,7 +80,7 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (!list.contains(controls::Brightness)) {\n+\t\tif (!list.get(controls::Brightness)) {\n \t\t\tcout << \"List should contain Brightness control\" << endl;\n \t\t\treturn TestFail;\n \t\t}\n@@ -99,7 +99,7 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (list.contains(controls::Contrast)) {\n+\t\tif (list.get(controls::Contrast)) {\n \t\t\tcout << \"List should not contain Contract control\" << endl;\n \t\t\treturn TestFail;\n \t\t}\n@@ -108,8 +108,8 @@ protected:\n \t\tlist.set(controls::Brightness, 0.0f);\n \t\tlist.set(controls::Contrast, 1.5f);\n \n-\t\tif (!list.contains(controls::Brightness) ||\n-\t\t !list.contains(controls::Contrast)) {\n+\t\tif (!list.get(controls::Brightness) ||\n+\t\t !list.get(controls::Contrast)) {\n \t\t\tcout << \"List should contain Brightness and Contrast controls\"\n \t\t\t << endl;\n \t\t\treturn TestFail;\n@@ -145,7 +145,7 @@ protected:\n \t\t */\n \t\tlist.set(controls::AwbEnable, true);\n \n-\t\tif (list.contains(controls::AwbEnable)) {\n+\t\tif (list.get(controls::AwbEnable)) {\n \t\t\tcout << \"List shouldn't contain AwbEnable control\" << endl;\n \t\t\treturn TestFail;\n \t\t}\n@@ -171,9 +171,9 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (!mergeList.contains(controls::Brightness) ||\n-\t\t !mergeList.contains(controls::Contrast) ||\n-\t\t !mergeList.contains(controls::Saturation)) {\n+\t\tif (!mergeList.get(controls::Brightness) ||\n+\t\t !mergeList.get(controls::Contrast) ||\n+\t\t !mergeList.get(controls::Saturation)) {\n \t\t\tcout << \"Merged list does not contain all controls\" << endl;\n \t\t\treturn TestFail;\n \t\t}\n", "prefixes": [ "libcamera-devel", "3/2" ] }