Patch Detail
Show a patch.
GET /api/1.1/patches/2344/?format=api
{ "id": 2344, "url": "https://patchwork.libcamera.org/api/1.1/patches/2344/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2344/", "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": "<20191122140346.11040-1-jacopo@jmondi.org>", "date": "2019-11-22T14:03:46", "name": "[libcamera-devel] test: controls: control_list: Add status check", "commit_ref": "a2a0e46576fb142147abfb94718831842fc39118", "pull_url": null, "state": "accepted", "archived": false, "hash": "5d99016ec9febd82353454878da42f312f91711c", "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/2344/mbox/", "series": [ { "id": 575, "url": "https://patchwork.libcamera.org/api/1.1/series/575/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=575", "date": "2019-11-22T14:03:46", "name": "[libcamera-devel] test: controls: control_list: Add status check", "version": 1, "mbox": "https://patchwork.libcamera.org/series/575/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2344/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2344/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 01DC36136E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Nov 2019 15:01:55 +0100 (CET)", "from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 797252000B;\n\tFri, 22 Nov 2019 14:01:55 +0000 (UTC)" ], "X-Originating-IP": "93.34.114.233", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 22 Nov 2019 15:03:46 +0100", "Message-Id": "<20191122140346.11040-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.23.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] test: controls: control_list: Add status\n\tcheck", "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, 22 Nov 2019 14:01:56 -0000" }, "content": "Since commit:\nfac471e812a9 (\"test: Extract CameraTest class out of camera tests to libtest\")\nthe control_list is a subclass of CameraTest, and the status returned by\nthe base class init() operation should be inspected to avoid accessing\nuninitialized fields during the run() operation execution.\n\nIf the VIMC test module is not loaded, executing the test results in a\nsegfault. Fix this by adding the init() operation where to status_ flag\nis checked for errors.\n\nFixes: fac471e812a9 (\"test: Extract CameraTest class out of camera tests to libtest\")\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n test/controls/control_list.cpp | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)", "diff": "diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp\nindex 4d212abd09e6..5374c6f99f80 100644\n--- a/test/controls/control_list.cpp\n+++ b/test/controls/control_list.cpp\n@@ -29,7 +29,12 @@ public:\n \t}\n \n protected:\n-\tint run()\n+\tint init() override\n+\t{\n+\t\treturn status_;\n+\t}\n+\n+\tint run() override\n \t{\n \t\tCameraControlValidator validator(camera_.get());\n \t\tControlList list(controls::controls, &validator);\n", "prefixes": [ "libcamera-devel" ] }