Patch Detail
Show a patch.
GET /api/1.1/patches/2687/?format=api
{ "id": 2687, "url": "https://patchwork.libcamera.org/api/1.1/patches/2687/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2687/", "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": "<20200120002437.6633-2-laurent.pinchart@ideasonboard.com>", "date": "2020-01-20T00:24:19", "name": "[libcamera-devel,01/19] test: buffer_import: Propagate status code from buffer allocation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "aa0dfe17c18adb9ecc3f27ce29898f0ff9b9943e", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2687/mbox/", "series": [ { "id": 641, "url": "https://patchwork.libcamera.org/api/1.1/series/641/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=641", "date": "2020-01-20T00:24:19", "name": "Initial libcamera threading model", "version": 1, "mbox": "https://patchwork.libcamera.org/series/641/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2687/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2687/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "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 E2FFA607A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jan 2020 01:24:42 +0100 (CET)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6F7B4529\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jan 2020 01:24:42 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1579479882;\n\tbh=P9OoRePHre0KNNhl+EZscIO2aiOkwmaJW4o5E68bEl8=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=agc/yUowOinYDihsZhkjLgLi7/GfmR7qMXmmmLuJ+4ujZXLRZgNkuHmWwxHrnNbhZ\n\t9niaAo6fI28FIqleuUU0neXzPXSEOVriNxjogx0eHyQ7pQ2Mdrg3NdDCMVHBfXPUXJ\n\tZujcn2G+Nc6iNmu5qCN+c+o+6ZgQUtZnRJXnZeUc=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 20 Jan 2020 02:24:19 +0200", "Message-Id": "<20200120002437.6633-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.24.1", "In-Reply-To": "<20200120002437.6633-1-laurent.pinchart@ideasonboard.com>", "References": "<20200120002437.6633-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 01/19] test: buffer_import: Propagate\n\tstatus code from buffer allocation", "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": "Mon, 20 Jan 2020 00:24:43 -0000" }, "content": "The BufferSource::allocate() return value isn't propagated correctly,\nresulting in a test failure when the test should be skipped due to a\nmissing vivid device. Fix it.\n\nWhile at it, return valid status codes from BufferSource::allocate() in\nall error cases, with proper diagnostic messages.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n test/camera/buffer_import.cpp | 18 +++++++++++++-----\n 1 file changed, 13 insertions(+), 5 deletions(-)", "diff": "diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\nindex e7048335e031..16bfca9beeea 100644\n--- a/test/camera/buffer_import.cpp\n+++ b/test/camera/buffer_import.cpp\n@@ -89,15 +89,23 @@ public:\n \t\tret = video_->getFormat(&format);\n \t\tif (ret) {\n \t\t\tstd::cout << \"Failed to get format on output device\" << std::endl;\n-\t\t\treturn ret;\n+\t\t\treturn TestFail;\n \t\t}\n \n \t\tformat.size = config.size;\n \t\tformat.fourcc = V4L2VideoDevice::toV4L2Fourcc(config.pixelFormat, false);\n-\t\tif (video_->setFormat(&format))\n+\t\tif (video_->setFormat(&format)) {\n+\t\t\tstd::cout << \"Failed to set format on output device\" << std::endl;\n \t\t\treturn TestFail;\n+\t\t}\n \n-\t\treturn video_->exportBuffers(config.bufferCount, &buffers_);\n+\t\tret = video_->exportBuffers(config.bufferCount, &buffers_);\n+\t\tif (ret < 0) {\n+\t\t\tstd::cout << \"Failed to export buffers\" << std::endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n+\t\treturn TestPass;\n \t}\n \n \tconst std::vector<std::unique_ptr<FrameBuffer>> &buffers()\n@@ -178,8 +186,8 @@ protected:\n \n \t\tBufferSource source;\n \t\tint ret = source.allocate(cfg);\n-\t\tif (ret < 0)\n-\t\t\treturn TestFail;\n+\t\tif (ret != TestPass)\n+\t\t\treturn ret;\n \n \t\tstd::vector<Request *> requests;\n \t\tfor (const std::unique_ptr<FrameBuffer> &buffer : source.buffers()) {\n", "prefixes": [ "libcamera-devel", "01/19" ] }