Show a patch.

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

{
    "id": 23089,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23089/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23089/",
    "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": "<20250401123633.58887-3-stefan.klug@ideasonboard.com>",
    "date": "2025-04-01T12:36:10",
    "name": "[v2,2/5] test: ipa: libipa: histogram: Add tests for quantile() returning a fraction",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b6180444513eec42678cd2f144b56778848cf448",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23089/mbox/",
    "series": [
        {
            "id": 5099,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5099/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5099",
            "date": "2025-04-01T12:36:08",
            "name": "Fix histogram for some (corner) cases",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5099/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23089/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23089/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 BEFC4C3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Apr 2025 12:36:45 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 81E246898A;\n\tTue,  1 Apr 2025 14:36:45 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F264D68986\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Apr 2025 14:36:43 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:14c7:4fcc:495b:719f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D5B668DB;\n\tTue,  1 Apr 2025 14:34:51 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"U18J/qYK\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743510891;\n\tbh=GZmB11y+IhtBtTi7bnLPo96lf/dc+fT1pp9i/K/fHhY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=U18J/qYKdKeUiRPwv5lIaUFKsxXpmpLvbYNyAqcWrIjtRtNu0p4q0AVpTSgcY0myL\n\tRNEufyMcQUKKmhO4E/7XoB/GJ/bZIn8XOqE+8mm6YzWNnejdJ1JybvW9sK5CwfvKQj\n\ts+hvMBx8taYwua4+W/oPt0UHfAtvdnq8cuAWxlb4=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Subject": "[PATCH v2 2/5] test: ipa: libipa: histogram: Add tests for\n\tquantile() returning a fraction",
        "Date": "Tue,  1 Apr 2025 14:36:10 +0200",
        "Message-ID": "<20250401123633.58887-3-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250401123633.58887-1-stefan.klug@ideasonboard.com>",
        "References": "<20250401123633.58887-1-stefan.klug@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Add tests for quantile() returning a fractional value. These cases will\nget fixed in the next commit. Therefore mark the test as should_fail.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\n\nChanges in v2:\n- Move test patch before fix and add should_fail.\n- Fixed comment\n- Collected tags\n---\n test/ipa/libipa/histogram.cpp | 9 +++++++++\n test/ipa/libipa/meson.build   | 5 +++--\n 2 files changed, 12 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/test/ipa/libipa/histogram.cpp b/test/ipa/libipa/histogram.cpp\nindex 312b88b0786b..5ce84a61b7da 100644\n--- a/test/ipa/libipa/histogram.cpp\n+++ b/test/ipa/libipa/histogram.cpp\n@@ -42,10 +42,19 @@ protected:\n \t\tASSERT_EQ(hist.quantile(1.0), 2.0);\n \t\tASSERT_EQ(hist.quantile(0.5), 1.0);\n \n+\t\t/* Test quantile in the middle of a bin. */\n+\t\tASSERT_EQ(hist.quantile(0.75), 1.5);\n+\n+\t\t/* Test quantile smaller than the smallest histogram step. */\n+\t\tASSERT_EQ(hist.quantile(0.001), 0.002);\n+\n \t\tASSERT_EQ(hist.interQuantileMean(0.0, 1.0), 1.0);\n \t\tASSERT_EQ(hist.interQuantileMean(0.0, 0.5), 0.5);\n \t\tASSERT_EQ(hist.interQuantileMean(0.5, 1.0), 1.5);\n \n+\t\t/* Test interquantile mean that starts and ends in the middle of a bin. */\n+\t\tASSERT_EQ(hist.interQuantileMean(0.25, 0.75), 1.0);\n+\n \t\treturn TestPass;\n \t}\n };\ndiff --git a/test/ipa/libipa/meson.build b/test/ipa/libipa/meson.build\nindex f094c1593f1b..83c84bd8c227 100644\n--- a/test/ipa/libipa/meson.build\n+++ b/test/ipa/libipa/meson.build\n@@ -2,7 +2,7 @@\n \n libipa_test = [\n     {'name': 'fixedpoint', 'sources': ['fixedpoint.cpp']},\n-    {'name': 'histogram', 'sources': ['histogram.cpp']},\n+    {'name': 'histogram', 'sources': ['histogram.cpp'], 'should_fail': true},\n     {'name': 'interpolator', 'sources': ['interpolator.cpp']},\n ]\n \n@@ -14,5 +14,6 @@ foreach test : libipa_test\n                      include_directories : [test_includes_internal,\n                                             '../../../src/ipa/libipa/'])\n \n-    test(test['name'], exe, suite : 'ipa')\n+    test(test['name'], exe, suite : 'ipa',\n+         should_fail : test.get('should_fail', false))\n endforeach\n",
    "prefixes": [
        "v2",
        "2/5"
    ]
}