Patch Detail
Show a patch.
GET /api/1.1/patches/3528/?format=api
{ "id": 3528, "url": "https://patchwork.libcamera.org/api/1.1/patches/3528/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3528/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200424215304.558317-11-jacopo@jmondi.org>", "date": "2020-04-24T21:53:01", "name": "[libcamera-devel,v3,10/13] test: v4l2_device: Test getControl() API", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "15e894bbc2a11f7d63589e99f8e9af129faf80c2", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3528/mbox/", "series": [ { "id": 822, "url": "https://patchwork.libcamera.org/api/1.1/series/822/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=822", "date": "2020-04-24T21:52:51", "name": "libcamera: Add CameraSensorInfo", "version": 3, "mbox": "https://patchwork.libcamera.org/series/822/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3528/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3528/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 261DD62E5D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Apr 2020 23:50:14 +0200 (CEST)", "from uno.homenet.telecomitalia.it\n\t(host240-55-dynamic.3-87-r.retail.telecomitalia.it [87.3.55.240])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 6904C60002;\n\tFri, 24 Apr 2020 21:50:13 +0000 (UTC)" ], "X-Originating-IP": "87.3.55.240", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 24 Apr 2020 23:53:01 +0200", "Message-Id": "<20200424215304.558317-11-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.26.1", "In-Reply-To": "<20200424215304.558317-1-jacopo@jmondi.org>", "References": "<20200424215304.558317-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 10/13] test: v4l2_device: Test\n\tgetControl() API", "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>", "X-List-Received-Date": "Fri, 24 Apr 2020 21:50:14 -0000" }, "content": "Add a simple test for the newly added method.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n test/v4l2_videodevice/controls.cpp | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)", "diff": "diff --git a/test/v4l2_videodevice/controls.cpp b/test/v4l2_videodevice/controls.cpp\nindex da9e0111e221..cf3d599c43ff 100644\n--- a/test/v4l2_videodevice/controls.cpp\n+++ b/test/v4l2_videodevice/controls.cpp\n@@ -121,6 +121,22 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n+\t\t/* Test the getControl() API. */\n+\t\tint32_t oldBrightness = ctrls.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n+\t\tint32_t newBrightness;\n+\t\tret = capture_->getControl(V4L2_CID_BRIGHTNESS, &newBrightness);\n+\t\tif (ret) {\n+\t\t\tcerr << \"Failed to read a single control\" << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n+\t\tif (newBrightness != oldBrightness) {\n+\t\t\tcerr << \"Wrong control value read from device: \"\n+\t\t\t << \"got: \" << newBrightness << \" expected: \"\n+\t\t\t << oldBrightness << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n \t\treturn TestPass;\n \t}\n };\n", "prefixes": [ "libcamera-devel", "v3", "10/13" ] }