[{"id":24696,"web_url":"https://patchwork.libcamera.org/comment/24696/","msgid":"<Yv7e0u/0fLxawZJS@pendragon.ideasonboard.com>","date":"2022-08-19T00:52:34","subject":"Re: [libcamera-devel] [PATCH v2 5/7] test: generated_serializer:\n\tTest Flags that is struct member","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Thu, Aug 18, 2022 at 03:49:20PM +0900, Paul Elder via libcamera-devel wrote:\n> Add a Flags field to the test struct to test\n> serialization/deserialization of Flags that are struct members.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> ---\n> Changes 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(+)\n> \n> diff --git a/test/serialization/generated_serializer/generated_serializer_test.cpp b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> index 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>  \n> diff --git a/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom b/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom\n> index 73081b40..698f4e89 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> +enum ErrorFlags {\n\nI assume this will become\n\n[scopedEnum] enum ErrorFlags {\n\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\nI forgot to mention that in the review of 4/7, so I'll mention it here:\nshould the attribute be [flags] to match the camelCase syntax of other\nattributes ?\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  };\n>  \n>  interface IPATestInterface {","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 3D5DDC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Aug 2022 00:52:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 96A2861FC0;\n\tFri, 19 Aug 2022 02:52:40 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5056061FA8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Aug 2022 02:52:38 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BD1308B;\n\tFri, 19 Aug 2022 02:52:37 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660870360;\n\tbh=/VSHWHyjDvq1FrCY1t9ohCrPPZCIfI2eWobSWbMopRs=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=H4JJCOIaW0bD8B4CnDSwGm9VCMMe4O56T5GvgnHhm0khLk4sbM7VCDmkLY+eTz+Bz\n\t3p4+NIv2N0JQ0cRfbkJ+50XaYGmXUIJ5KraqImm+fb9YlInK2IRP0+NhRCbcPmA2NF\n\tzhHgKjXmD5nOC5K1alc9zelRi/G9Ba4AfWWq1AgGo5jCgb08t+tZ2T/OfFYcMaVjdF\n\tDIsoof8ksyKp/veCVpsrDZWoKWlmsbtQN6n3gTzust5Apx6AChgmGCmn0XK6olXmcu\n\t9XyVoVLBBgLYLymfnIpm9y2f5fm0ZtujWaBfqe/FRIF6xVGDwU1EH3rbxvrb5Om3RO\n\t3R9J/9i/KFM6w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660870357;\n\tbh=/VSHWHyjDvq1FrCY1t9ohCrPPZCIfI2eWobSWbMopRs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=OJV1mJepvls87LfIQuIINpAaEL+RFp5bJbLFv9eYpL57pw5PXY94+Bpp9jJOVQTJi\n\tHwSif6hc8xZKG0YbUlQKiQxj6phA/+zHMQG6Kn6m2hwVOBpbaAq6UtQPihsAZ2X02l\n\txq8VvlNz+ALwH3F8uk01wIcVKKLkSXTv/4kRiuuc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"OJV1mJep\"; dkim-atps=neutral","Date":"Fri, 19 Aug 2022 03:52:34 +0300","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<Yv7e0u/0fLxawZJS@pendragon.ideasonboard.com>","References":"<20220818064923.2573060-1-paul.elder@ideasonboard.com>\n\t<20220818064923.2573060-6-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220818064923.2573060-6-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 5/7] test: generated_serializer:\n\tTest Flags 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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24710,"web_url":"https://patchwork.libcamera.org/comment/24710/","msgid":"<20220819074302.GB34241@pyrite.rasen.tech>","date":"2022-08-19T07:43:02","subject":"Re: [libcamera-devel] [PATCH v2 5/7] test: generated_serializer:\n\tTest Flags that is struct member","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Laurent,\n\nOn Fri, Aug 19, 2022 at 03:52:34AM +0300, Laurent Pinchart wrote:\n> Hi Paul,\n> \n> Thank you for the patch.\n> \n> On Thu, Aug 18, 2022 at 03:49:20PM +0900, Paul Elder via libcamera-devel wrote:\n> > Add a Flags field to the test struct to test\n> > serialization/deserialization of Flags that are struct members.\n> > \n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > \n> > ---\n> > Changes 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(+)\n> > \n> > diff --git a/test/serialization/generated_serializer/generated_serializer_test.cpp b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> > index 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> >  \n> > diff --git a/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom b/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom\n> > index 73081b40..698f4e89 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> > +enum ErrorFlags {\n> \n> I assume this will become\n> \n> [scopedEnum] enum ErrorFlags {\n\nYeah, it will.\n\n> \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> I forgot to mention that in the review of 4/7, so I'll mention it here:\n> should the attribute be [flags] to match the camelCase syntax of other\n> attributes ?\n\nThat's what I thought too on one hand, but my other hand said that it's\nmeant to become Flags<ErrorFlags>, so I matched the capitalization to\nthat.\n\nWhich hand is better?\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nThanks,\n\nPaul\n\n> \n> >  };\n> >  \n> >  interface IPATestInterface {","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 E7C46BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Aug 2022 07:43:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7386461FA3;\n\tFri, 19 Aug 2022 09:43:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B734961FA3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Aug 2022 09:43:10 +0200 (CEST)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1B9013F1;\n\tFri, 19 Aug 2022 09:43:08 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660894992;\n\tbh=WCWl8fULYD46+wJUcAGM4txs9ANdgRkShEiXn/k7uq4=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=k95huaWceZxHu4Rb1ByDLiwnZZ5fRLL8B53VSRjghZIjKWf0Boaq2gocd+0g0Ys4V\n\tdlYTtKpiq7I15fFf+r+/OmBK5DSt35bRBwOlGkRYPl9fgmAdxI10A42S0fVrcJOd5/\n\tnyL9Qpk4/OwVk0Bn9VOgnw80QGq1RRZPUcbiGtq16HNt+PKFsLzzBQt3GqsxYHU+QR\n\tyb/gaXQorkVM/CO9hUDYjjPX6zc5vhQ59Y4BxjvvOT+tyPIi3fjzMSBVKZJCUBnAJT\n\trGOn5W/i0CLnHcJytlU9WQcU0d0g7Gqa/FkK1EMYzviRYpdd+ockXU0lI9q2AY73Xs\n\tIDqa44RM0u1nw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660894990;\n\tbh=WCWl8fULYD46+wJUcAGM4txs9ANdgRkShEiXn/k7uq4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NjUIu86QUOYyVPuKKsiAs4Wy7USnauik1X4WcwQSJ35NHdn+H/DCAOHz8gYBo0DaF\n\twhgwJOQUm33PuiEts4YO3hH+gmL3gD0oIfpPRF9B/pWDjbhFDvFgL5FYq/tI5PVBpu\n\t8nWWp5QzP/28+7NENQadnOn4chzwp6wO3LWfLpks="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"NjUIu86Q\"; dkim-atps=neutral","Date":"Fri, 19 Aug 2022 16:43:02 +0900","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220819074302.GB34241@pyrite.rasen.tech>","References":"<20220818064923.2573060-1-paul.elder@ideasonboard.com>\n\t<20220818064923.2573060-6-paul.elder@ideasonboard.com>\n\t<Yv7e0u/0fLxawZJS@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<Yv7e0u/0fLxawZJS@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 5/7] test: generated_serializer:\n\tTest Flags 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@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24712,"web_url":"https://patchwork.libcamera.org/comment/24712/","msgid":"<Yv9E11gSMu6fyCt5@pendragon.ideasonboard.com>","date":"2022-08-19T08:07:51","subject":"Re: [libcamera-devel] [PATCH v2 5/7] test: generated_serializer:\n\tTest Flags that is struct member","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nOn Fri, Aug 19, 2022 at 04:43:02PM +0900, paul.elder@ideasonboard.com wrote:\n> On Fri, Aug 19, 2022 at 03:52:34AM +0300, Laurent Pinchart wrote:\n> > On Thu, Aug 18, 2022 at 03:49:20PM +0900, Paul Elder via libcamera-devel wrote:\n> > > Add a Flags field to the test struct to test\n> > > serialization/deserialization of Flags that are struct members.\n> > > \n> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > > \n> > > ---\n> > > Changes 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(+)\n> > > \n> > > diff --git a/test/serialization/generated_serializer/generated_serializer_test.cpp b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> > > index 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> > >  \n> > > diff --git a/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom b/test/serialization/generated_serializer/include/libcamera/ipa/test.mojom\n> > > index 73081b40..698f4e89 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> > > +enum ErrorFlags {\n> > \n> > I assume this will become\n> > \n> > [scopedEnum] enum ErrorFlags {\n> \n> Yeah, it will.\n> \n> > \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> > I forgot to mention that in the review of 4/7, so I'll mention it here:\n> > should the attribute be [flags] to match the camelCase syntax of other\n> > attributes ?\n> \n> That's what I thought too on one hand, but my other hand said that it's\n> meant to become Flags<ErrorFlags>, so I matched the capitalization to\n> that.\n> \n> Which hand is better?\n\nI usually like consistency, but I'm ok with Flags if you strongly prefer\nthat or if there's a general mild preference.\n\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > >  };\n> > >  \n> > >  interface IPATestInterface {","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 ACED6C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Aug 2022 08:07:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 14F9E61FC0;\n\tFri, 19 Aug 2022 10:07:58 +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 58C7F61FA3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Aug 2022 10:07:56 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BBCF63F1;\n\tFri, 19 Aug 2022 10:07:55 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660896478;\n\tbh=cORUmGnrDPYOdxqLV39UuCeKeCuetS6wldsMD+pin00=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=TqvJKxw/C3r9jOmabg59uirtiEaixFTPyLLC1EUGgoB+sfHIaLE9nos7Bhe3xhy3l\n\ty2iew4d46+nwGTRAhmWB20UMlg5Bhpw0JSG8PfFahwuRvItbdUxx5FJ1P2Lp8ZLQ+/\n\t7uC3flLVnpBkaun9mjk1g7Iwh6qAiSZIXABlA0jlxpIRD8I9G2op/0pxArc4L3IjsM\n\t4l0hjrZNTm2ROywdEztsOFK1613OtOyn+qkm0pTRhcc7XQl6mvqnQ+ISJtG/rhntnk\n\tCUuXHms9m1i7NYhI+rgMvsnwmuFHVtiEVmqQCg70DqmaXEAMQCvIez7bJMgypJX+7m\n\tR/xBhZsSj1uXg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660896475;\n\tbh=cORUmGnrDPYOdxqLV39UuCeKeCuetS6wldsMD+pin00=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iRODthIOj/wcGdTasykyYGEom/goOcKpMLM2czyY2pDikFhavHriBOB+OWQRA7WFs\n\th9Ixemjn15odp8f9IGAYlPpQcZ2WjBIdrG35W2y0SeyZKcJ0aUOk82ZzK/9WHZv3Yp\n\tSrEUKndKShiKyV/XUIAlesz5cnl1wJuv961VI+eY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"iRODthIO\"; dkim-atps=neutral","Date":"Fri, 19 Aug 2022 11:07:51 +0300","To":"paul.elder@ideasonboard.com","Message-ID":"<Yv9E11gSMu6fyCt5@pendragon.ideasonboard.com>","References":"<20220818064923.2573060-1-paul.elder@ideasonboard.com>\n\t<20220818064923.2573060-6-paul.elder@ideasonboard.com>\n\t<Yv7e0u/0fLxawZJS@pendragon.ideasonboard.com>\n\t<20220819074302.GB34241@pyrite.rasen.tech>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220819074302.GB34241@pyrite.rasen.tech>","Subject":"Re: [libcamera-devel] [PATCH v2 5/7] test: generated_serializer:\n\tTest Flags 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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]