Show a patch.

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

{
    "id": 15151,
    "url": "https://patchwork.libcamera.org/api/patches/15151/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15151/",
    "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": "<20211213145143.218734-3-jacopo@jmondi.org>",
    "date": "2021-12-13T14:51:43",
    "name": "[libcamera-devel,2/2] test: fence: Signal fence once",
    "commit_ref": "5c4f9e3ae3f06d97453e18230dc55caacb0ea6fe",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "821efb4de0570b50f174b031a21147bd3ccbc203",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15151/mbox/",
    "series": [
        {
            "id": 2840,
            "url": "https://patchwork.libcamera.org/api/series/2840/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2840",
            "date": "2021-12-13T14:51:41",
            "name": "test: fence: Fixes for the fence test",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2840/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15151/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15151/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 6E8F8C324B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Dec 2021 14:50:59 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9C4CC6089C;\n\tMon, 13 Dec 2021 15:50:58 +0100 (CET)",
            "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 07FE960868\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Dec 2021 15:50:55 +0100 (CET)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 9B57D6000D;\n\tMon, 13 Dec 2021 14:50:54 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 13 Dec 2021 15:51:43 +0100",
        "Message-Id": "<20211213145143.218734-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.33.1",
        "In-Reply-To": "<20211213145143.218734-1-jacopo@jmondi.org>",
        "References": "<20211213145143.218734-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/2] test: fence: Signal fence once",
        "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": "The unit test associates a fence with a framebuffer and makes sure\nthe fence is correctly signalled.\n\nOnce a fence is correctly signalled, it is released by the core, and the\nunderlying file descriptor closed.\n\nThe unit test however tries to write on the fence file descriptor every\ntime the designated Request is queued, and error which is now visible\nas the return value of the fence signalling write() is checked.\n\nFix that by associating a fence with a framebuffer only once.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n test/fence.cpp | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/test/fence.cpp b/test/fence.cpp\nindex d2865398784e..524db2a10757 100644\n--- a/test/fence.cpp\n+++ b/test/fence.cpp\n@@ -56,6 +56,7 @@ private:\n \tStream *stream_;\n \n \tbool expectedCompletionResult_ = true;\n+\tbool setFence_ = true;\n \n \tunsigned int completedRequest_;\n \n@@ -193,7 +194,7 @@ void FenceTest::requestRequeue(Request *request)\n \n \trequest->reuse();\n \n-\tif (cookie == signalledRequestId_) {\n+\tif (cookie == signalledRequestId_ && setFence_) {\n \t\t/*\n \t\t * The second time this request is queued add a fence to it.\n \t\t *\n@@ -257,6 +258,7 @@ void FenceTest::signalFence()\n \tif (ret != sizeof(value))\n \t\tcerr << \"Failed to signal fence\" << endl;\n \n+\tsetFence_ = false;\n \tdispatcher_->processEvents();\n }\n \n@@ -316,7 +318,7 @@ int FenceTest::run()\n \tTimer timer;\n \ttimer.start(1000);\n \twhile (timer.isRunning() && expectedCompletionResult_) {\n-\t\tif (completedRequest_ == signalledRequestId_)\n+\t\tif (completedRequest_ == signalledRequestId_ && setFence_)\n \t\t\t/*\n \t\t\t * signalledRequestId_ has just completed and it has\n \t\t\t * been re-queued with a fence. Start the timer to\n",
    "prefixes": [
        "libcamera-devel",
        "2/2"
    ]
}