Show a patch.

GET /api/patches/23286/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 23286,
    "url": "https://patchwork.libcamera.org/api/patches/23286/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23286/",
    "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": "<20250428090413.38234-15-s.pueschel@pengutronix.de>",
    "date": "2025-04-28T09:02:39",
    "name": "[v11,14/19] lc-compliance: Add test to queue more requests than hardware depth",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "122bfd670cafd86e982ddc70eda73b22dad14482",
    "submitter": {
        "id": 225,
        "url": "https://patchwork.libcamera.org/api/people/225/?format=api",
        "name": "Sven Püschel",
        "email": "s.pueschel@pengutronix.de"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23286/mbox/",
    "series": [
        {
            "id": 5148,
            "url": "https://patchwork.libcamera.org/api/series/5148/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5148",
            "date": "2025-04-28T09:02:25",
            "name": "lc-compliance: Add test to queue more requests than hardware depth",
            "version": 11,
            "mbox": "https://patchwork.libcamera.org/series/5148/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23286/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23286/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 1171BC327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Apr 2025 09:05:35 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73CB868ADE;\n\tMon, 28 Apr 2025 11:05:35 +0200 (CEST)",
            "from metis.whiteo.stw.pengutronix.de\n\t(metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9EDBE68B29\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Apr 2025 11:05:08 +0200 (CEST)",
            "from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77]\n\thelo=peter.guest.stw.pengutronix.de)\n\tby metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92)\n\t(envelope-from <s.pueschel@pengutronix.de>)\n\tid 1u9KQG-0001au-4A; Mon, 28 Apr 2025 11:05:08 +0200"
        ],
        "From": "=?utf-8?q?Sven_P=C3=BCschel?= <s.pueschel@pengutronix.de>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "=?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>",
        "Subject": "[PATCH v11 14/19] lc-compliance: Add test to queue more requests\n\tthan hardware depth",
        "Date": "Mon, 28 Apr 2025 11:02:39 +0200",
        "Message-ID": "<20250428090413.38234-15-s.pueschel@pengutronix.de>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250428090413.38234-1-s.pueschel@pengutronix.de>",
        "References": "<20250428090413.38234-1-s.pueschel@pengutronix.de>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-SA-Exim-Connect-IP": "2a0a:edc0:0:900:1d::77",
        "X-SA-Exim-Mail-From": "s.pueschel@pengutronix.de",
        "X-SA-Exim-Scanned": "No (on metis.whiteo.stw.pengutronix.de);\n\tSAEximRunCond expanded to false",
        "X-PTX-Original-Recipient": "libcamera-devel@lists.libcamera.org",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Nícolas F. R. A. Prado <nfraprado@collabora.com>\n\nA pipeline handler should be able to handle an arbitrary number of\nsimultaneous requests by submitting what it can to the video device and\nqueuing the rest internally until resources are available. This isn't\ncurrently done by some pipeline handlers however [1].\n\nAdd a new test to lc-compliance that submits a lot of requests at once\nto check if the pipeline handler is behaving well in this situation.\n\n[1] https://bugs.libcamera.org/show_bug.cgi?id=24\n\nSigned-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nChanges in v11:\n- Removed Capture class overloading\n- Adapted to also handle multiple roles\n\nChanges in v9:\n- rebased\n\n(no changes since v6)\n\nChanges in v6:\n- Made MAX_SIMULTANEOUS_REQUESTS a constexpr\n\nChanges in v5:\n- Updated to use googletest, and CameraHolder and roleToString from previous\n  patches\n---\n src/apps/lc-compliance/tests/capture_test.cpp | 55 +++++++++++++++++++\n 1 file changed, 55 insertions(+)",
    "diff": "diff --git a/src/apps/lc-compliance/tests/capture_test.cpp b/src/apps/lc-compliance/tests/capture_test.cpp\nindex 24081fef..3aa82858 100644\n--- a/src/apps/lc-compliance/tests/capture_test.cpp\n+++ b/src/apps/lc-compliance/tests/capture_test.cpp\n@@ -21,6 +21,8 @@ namespace {\n \n using namespace libcamera;\n \n+static constexpr unsigned int MAX_SIMULTANEOUS_REQUESTS = 8;\n+\n class SimpleCapture : public testing::TestWithParam<std::tuple<std::vector<StreamRole>, int>>, public CameraHolder\n {\n public:\n@@ -58,6 +60,36 @@ std::string SimpleCapture::nameParameters(const testing::TestParamInfo<SimpleCap\n \treturn ss.str();\n }\n \n+class RoleParametrizedTest : public testing::TestWithParam<std::vector<StreamRole>>, public CameraHolder\n+{\n+public:\n+\tstatic std::string nameParameters(const testing::TestParamInfo<RoleParametrizedTest::ParamType> &info);\n+\n+protected:\n+\tvoid SetUp() override;\n+\tvoid TearDown() override;\n+};\n+\n+void RoleParametrizedTest::SetUp()\n+{\n+\tacquireCamera();\n+}\n+\n+void RoleParametrizedTest::TearDown()\n+{\n+\treleaseCamera();\n+}\n+\n+std::string RoleParametrizedTest::nameParameters(const testing::TestParamInfo<RoleParametrizedTest::ParamType> &info)\n+{\n+\tstd::ostringstream ss;\n+\n+\tfor (StreamRole r : info.param)\n+\t\tss << r << '_';\n+\n+\treturn ss.str();\n+}\n+\n /*\n  * Test single capture cycles\n  *\n@@ -120,6 +152,19 @@ TEST_P(SimpleCapture, UnbalancedStop)\n \tcapture.run(numRequests);\n }\n \n+TEST_P(RoleParametrizedTest, Overflow)\n+{\n+\tauto roles = GetParam();\n+\n+\tCapture capture(camera_);\n+\n+\tcapture.configure(roles);\n+\n+\tcapture.allocateBuffers(MAX_SIMULTANEOUS_REQUESTS);\n+\n+\tcapture.run(MAX_SIMULTANEOUS_REQUESTS, MAX_SIMULTANEOUS_REQUESTS);\n+}\n+\n const int NUMREQUESTS[] = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 };\n \n const std::vector<StreamRole> SINGLEROLES[] = {\n@@ -148,4 +193,14 @@ INSTANTIATE_TEST_SUITE_P(MultiStream,\n \t\t\t\t\t  testing::ValuesIn(NUMREQUESTS)),\n \t\t\t SimpleCapture::nameParameters);\n \n+INSTANTIATE_TEST_SUITE_P(SingleStream,\n+\t\t\t RoleParametrizedTest,\n+\t\t\t testing::ValuesIn(SINGLEROLES),\n+\t\t\t RoleParametrizedTest::nameParameters);\n+\n+INSTANTIATE_TEST_SUITE_P(MultiStream,\n+\t\t\t RoleParametrizedTest,\n+\t\t\t testing::ValuesIn(MULTIROLES),\n+\t\t\t RoleParametrizedTest::nameParameters);\n+\n } /* namespace */\n",
    "prefixes": [
        "v11",
        "14/19"
    ]
}