Show a patch.

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

{
    "id": 17211,
    "url": "https://patchwork.libcamera.org/api/patches/17211/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17211/",
    "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": "<20220826154419.4099372-6-paul.elder@ideasonboard.com>",
    "date": "2022-08-26T15:44:17",
    "name": "[libcamera-devel,v3,5/7] test: generated_serializer: Test Flags that is struct member",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "54fdf61f4b900b4477f730092a0daadb240a9f64",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17211/mbox/",
    "series": [
        {
            "id": 3438,
            "url": "https://patchwork.libcamera.org/api/series/3438/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3438",
            "date": "2022-08-26T15:44:12",
            "name": "utils: ipc: Add support for enums and Flags",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3438/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17211/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17211/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 C7D3DC327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Aug 2022 15:44:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 751B261FCB;\n\tFri, 26 Aug 2022 17:44:40 +0200 (CEST)",
            "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 56CE961FCB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Aug 2022 17:44:36 +0200 (CEST)",
            "from pyrite.mediacom.info (unknown\n\t[IPv6:2604:2d80:ad8a:9000:1bf9:855b:22de:3645])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 254272B3;\n\tFri, 26 Aug 2022 17:44:35 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1661528680;\n\tbh=B3IpfrJu1ZQn5Z4bAjb0etf6JChLMz1BILYAvJsw77g=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=JH3bEUMgOgiU3A35omOroaJks+rnjGgpPHkqWM/SRn1at5MxiS9dN0DryOklCTjvc\n\t7WMiTZgzdYW6OXflrvJFhdBNMMPPc3demMuHUeI3ynwkFYZPkxsRfJUuGt1JOdaay0\n\t+TmZCp6E4D3vO6gWDK06ww0boD3pY9ietlCTpB0cvxrEkZCw2NhCq+O34s6qbkbvYB\n\teQzqfWhfk0VVS8TefcJLjGlJZvOVE93Pg/PLLDNZ3XaTx5W+u1T+d5SKOxirl7/a/3\n\tIbbPB3OxKhj+oHysykAD5G8fj+pXNUq2c5IbqK38Tmf9qKx1bdamD5Z9EYnsh60U8I\n\tD+PBgcqdJLvAQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1661528676;\n\tbh=B3IpfrJu1ZQn5Z4bAjb0etf6JChLMz1BILYAvJsw77g=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=DR6cG4SBYNfBpq2SLKPbyZXJXGJ7b3GAJG0cNFM4xv7LHyYeeZaM8UDgr3R0ZTPWU\n\tJIRTtxviolI1MUsCI+Tkth6Au0a4MzO3/pPEvpS+E5tG16pZKUho508aHKlCIkEaU3\n\tcKnUwGvIv6Dm2akhSEWnWeMhKXkyTn3rLNf//8SY="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"DR6cG4SB\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 26 Aug 2022 10:44:17 -0500",
        "Message-Id": "<20220826154419.4099372-6-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20220826154419.4099372-1-paul.elder@ideasonboard.com>",
        "References": "<20220826154419.4099372-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 5/7] test: generated_serializer: Test\n\tFlags that is struct member",
        "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>",
        "From": "Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Paul Elder <paul.elder@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a Flags field to the test struct to test\nserialization/deserialization of Flags that are struct members.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v3:\n- add [scopedEnum] to enum ErrorFlags\n- s/[Flags]/[flags]/\n\nChanges in v2:\n- use new attribute-based mojom definition for Flags\n---\n .../generated_serializer_test.cpp             | 19 +++++++++++++++++++\n .../include/libcamera/ipa/test.mojom          |  8 ++++++++\n 2 files changed, 27 insertions(+)",
    "diff": "diff --git a/test/serialization/generated_serializer/generated_serializer_test.cpp b/test/serialization/generated_serializer/generated_serializer_test.cpp\nindex a4639a80..a2d71d62 100644\n--- a/test/serialization/generated_serializer/generated_serializer_test.cpp\n+++ b/test/serialization/generated_serializer/generated_serializer_test.cpp\n@@ -53,6 +53,11 @@ if (struct1.field != struct2.field) {\t\t\t\t\\\n \t\tt.i  = 58527;\n \t\tt.c = ipa::test::IPAOperationInit;\n \n+\t\tFlags<ipa::test::ErrorFlags> flags;\n+\t\tflags |= ipa::test::ErrorFlags::Error1;\n+\t\tflags |= ipa::test::ErrorFlags::Error2;\n+\t\tt.f = flags;\n+\n \t\tstd::vector<uint8_t> serialized;\n \n \t\tstd::tie(serialized, ignore) =\n@@ -72,6 +77,10 @@ if (struct1.field != struct2.field) {\t\t\t\t\\\n \t\tTEST_FIELD_EQUALITY(t, u, i);\n \t\tTEST_FIELD_EQUALITY(t, u, c);\n \n+\t\tif (t.f != u.f) {\n+\t\t\tcerr << \"Flags f field incorrect\" << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n \n \t\t/* Test vector of generated structs */\n \t\tstd::vector<ipa::test::TestStruct> v = { t, u };\n@@ -96,12 +105,22 @@ if (struct1.field != struct2.field) {\t\t\t\t\\\n \t\tTEST_FIELD_EQUALITY(v[0], w[0], i);\n \t\tTEST_FIELD_EQUALITY(v[0], w[0], c);\n \n+\t\tif (v[0].f != w[0].f) {\n+\t\t\tcerr << \"Flags f field incorrect\" << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n \t\tTEST_FIELD_EQUALITY(v[1], w[1], s1);\n \t\tTEST_FIELD_EQUALITY(v[1], w[1], s2);\n \t\tTEST_FIELD_EQUALITY(v[1], w[1], s3);\n \t\tTEST_FIELD_EQUALITY(v[1], w[1], i);\n \t\tTEST_FIELD_EQUALITY(v[1], w[1], c);\n \n+\t\tif (v[1].f != w[1].f) {\n+\t\t\tcerr << \"Flags f field incorrect\" << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n \t\treturn TestPass;\n \t}\n \ndiff --git a/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom b/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom\nindex 73081b40..a988c996 100644\n--- a/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom\n+++ b/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom\n@@ -9,6 +9,13 @@ enum IPAOperationCode {\n \tIPAOperationStop,\n };\n \n+[scopedEnum] enum ErrorFlags {\n+\tError1 = 0x1,\n+\tError2 = 0x2,\n+\tError3 = 0x4,\n+\tError4 = 0x8,\n+};\n+\n struct IPASettings {};\n \n struct TestStruct {\n@@ -19,6 +26,7 @@ struct TestStruct {\n \tint32 i;\n \tstring s3;\n \tIPAOperationCode c;\n+\t[flags] ErrorFlags f;\n };\n \n interface IPATestInterface {\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "5/7"
    ]
}