Patch Detail
Show a patch.
GET /api/1.1/patches/13477/?format=api
{ "id": 13477, "url": "https://patchwork.libcamera.org/api/1.1/patches/13477/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13477/", "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": "<20210824195636.1110845-17-nfraprado@collabora.com>", "date": "2021-08-24T19:56:35", "name": "[libcamera-devel,v8,16/17] lc-compliance: Check that requests complete successfully", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "6a76b3d8e74520acdf33c345f62285ec951d6f70", "submitter": { "id": 84, "url": "https://patchwork.libcamera.org/api/1.1/people/84/?format=api", "name": "Nícolas F. R. A. Prado", "email": "nfraprado@collabora.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13477/mbox/", "series": [ { "id": 2389, "url": "https://patchwork.libcamera.org/api/1.1/series/2389/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2389", "date": "2021-08-24T19:56:19", "name": "lc-compliance: Add test to queue more requests than hardware depth", "version": 8, "mbox": "https://patchwork.libcamera.org/series/2389/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13477/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13477/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 7A095C3250\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 Aug 2021 19:58:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 64DD6688AE;\n\tTue, 24 Aug 2021 21:57:57 +0200 (CEST)", "from bhuna.collabora.co.uk (bhuna.collabora.co.uk\n\t[IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 85D3F60505\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 Aug 2021 21:57:56 +0200 (CEST)", "from [127.0.0.1] (localhost [127.0.0.1])\n\t(Authenticated sender: nfraprado) with ESMTPSA id 29BAF1F43387" ], "From": "=?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 24 Aug 2021 16:56:35 -0300", "Message-Id": "<20210824195636.1110845-17-nfraprado@collabora.com>", "X-Mailer": "git-send-email 2.33.0", "In-Reply-To": "<20210824195636.1110845-1-nfraprado@collabora.com>", "References": "<20210824195636.1110845-1-nfraprado@collabora.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v8 16/17] lc-compliance: Check that\n\trequests complete successfully", "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>", "Cc": "kernel@collabora.com, =?utf-8?q?Andr=C3=A9_Almeida?=\n\t<andrealmeid@collabora.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "When a request fails to queue it is completed but with its status set to\nRequestCancelled. Add a check in the requestComplete callback to make\nsure that the request was completed successfully.\n\nFor the SimpleCaptureUnbalanced test we need to do this check only if\nthe capture isn't over yet, otherwise the few extra requests that get\ncancelled at the end, which is the normal behavior, will make the test\nfail.\n\nSigned-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>\n\n---\n\nChanges in v8:\n- Fixed issue in UnbalancedStop test where requests cancelled due to stop() call\n were failing the test\n- Fixed formatting\n\nChanges in v5:\n- New\n\n src/lc-compliance/simple_capture.cpp | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/src/lc-compliance/simple_capture.cpp b/src/lc-compliance/simple_capture.cpp\nindex d4805ff3403c..701d0feb70d1 100644\n--- a/src/lc-compliance/simple_capture.cpp\n+++ b/src/lc-compliance/simple_capture.cpp\n@@ -165,6 +165,9 @@ int SimpleCaptureBalanced::queueRequest(Request *request)\n \n void SimpleCaptureBalanced::requestComplete(Request *request)\n {\n+\tEXPECT_EQ(request->status(), Request::Status::RequestComplete)\n+\t\t<< \"Request didn't complete successfully\";\n+\n \tif (captureCompleted())\n \t\treturn;\n \n@@ -202,6 +205,9 @@ void SimpleCaptureUnbalanced::requestComplete(Request *request)\n \tif (captureCompleted())\n \t\treturn;\n \n+\tEXPECT_EQ(request->status(), Request::Status::RequestComplete)\n+\t\t<< \"Request didn't complete successfully\";\n+\n \trequest->reuse(Request::ReuseBuffers);\n \tif (camera_->queueRequest(request))\n \t\tloop_->exit(-EINVAL);\n@@ -233,5 +239,8 @@ void SimpleCaptureOverflow::capture()\n \n void SimpleCaptureOverflow::requestComplete([[maybe_unused]] Request *request)\n {\n+\tEXPECT_EQ(request->status(), Request::Status::RequestComplete)\n+\t\t<< \"Request didn't complete successfully\";\n+\n \tcaptureCompleted();\n }\n", "prefixes": [ "libcamera-devel", "v8", "16/17" ] }