[{"id":15380,"web_url":"https://patchwork.libcamera.org/comment/15380/","msgid":"<YD2OcAUqkkic/W4L@pendragon.ideasonboard.com>","date":"2021-03-02T01:01:36","subject":"Re: [libcamera-devel] [PATCH v9 3/3] tests: Test IPA serializer\n\tgeneration","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 Mon, Mar 01, 2021 at 03:52:26PM +0900, Paul Elder wrote:\n> Add a test to confirm that serializer and header generation works\n> properly for mojom definition files, and that the serializer works\n> properly.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> ---\n> Changes in v9:\n> - rename everything vimc to test\n> - add std:: to vectors and ties\n> \n> No change in v8\n> \n> Changes in v7:\n> - add test to test serdes of a vector of *generated* structs\n> \n> Changes in v6:\n> - use namespacing in the mojom file, and in the test\n> - add the enum to the test mojom file, as vimc.h no longer exists\n> \n> Changes in v5:\n> - add dummy event to event interface\n> \n> New in v4\n> ---\n>  .../generated_serializer_test.cpp             | 156 ++++++++++++++++++\n>  .../libcamera/ipa/test_ipa_interface.h        |   0\n>  .../generated_serializer/meson.build          |  52 ++++++\n>  .../generated_serializer/test.mojom           |  33 ++++\n>  test/serialization/meson.build                |   2 +\n>  5 files changed, 243 insertions(+)\n>  create mode 100644 test/serialization/generated_serializer/generated_serializer_test.cpp\n>  create mode 100644 test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h\n>  create mode 100644 test/serialization/generated_serializer/meson.build\n>  create mode 100644 test/serialization/generated_serializer/test.mojom\n> \n> diff --git a/test/serialization/generated_serializer/generated_serializer_test.cpp b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> new file mode 100644\n> index 00000000..698c81d6\n> --- /dev/null\n> +++ b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> @@ -0,0 +1,156 @@\n> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> +/*\n> + * Copyright (C) 2020, Google Inc.\n> + *\n> + * generated_serializer_test.cpp - Test generated serializer\n> + */\n> +\n> +#include <algorithm>\n> +#include <tuple>\n> +#include <vector>\n> +\n> +#include \"test.h\"\n> +\n> +#include \"test_ipa_interface.h\"\n> +#include \"test_ipa_serializer.h\"\n> +\n> +using namespace std;\n> +using namespace libcamera;\n> +\n> +class IPAGeneratedSerializerTest : public Test\n> +{\n> +protected:\n> +\tint init() override\n> +\t{\n> +\t\treturn TestPass;\n> +\t}\n> +\n> +\tint run() override\n> +\t{\n> +\n> +#define TEST_FIELD_EQUALITY(struct1, struct2, field)\t\t\\\n> +if (struct1.field != struct2.field) {\t\t\t\t\\\n> +\tcerr << #field << \" field incorrect: expected \\\"\"\t\\\n> +\t     << t.field << \"\\\", got \\\"\" << u.field << \"\\\"\" << endl;\\\n> +\treturn TestFail;\t\t\t\t\t\\\n> +}\n> +\n> +\t\tipa::test::TestStruct t, u;\n> +\n> +\t\tt.m = {\n> +\t\t\t{ \"a\", \"z\" },\n> +\t\t\t{ \"b\", \"z\" },\n> +\t\t\t{ \"c\", \"z\" },\n> +\t\t\t{ \"d\", \"z\" },\n> +\t\t\t{ \"e\", \"z\" },\n> +\t\t};\n> +\n> +\t\tt.a = { \"a\", \"b\", \"c\", \"d\", \"e\" };\n> +\n> +\t\tt.s1 = \"hello world\";\n> +\t\tt.s2 = \"goodbye\";\n> +\t\tt.s3 = \"lorem ipsum\";\n> +\t\tt.i  = 58527;\n> +\n> +\t\tstd::vector<uint8_t> serialized;\n> +\n> +\t\tstd::tie(serialized, ignore) =\n> +\t\t\tIPADataSerializer<ipa::test::TestStruct>::serialize(t);\n> +\n> +\t\tu = IPADataSerializer<ipa::test::TestStruct>::deserialize(serialized);\n> +\n> +\t\tif (!equals(t.m, u.m))\n> +\t\t\treturn TestFail;\n> +\n> +\t\tif (!equals(t.a, u.a))\n> +\t\t\treturn TestFail;\n> +\n> +\t\tTEST_FIELD_EQUALITY(t, u, s1);\n> +\t\tTEST_FIELD_EQUALITY(t, u, s2);\n> +\t\tTEST_FIELD_EQUALITY(t, u, s3);\n> +\t\tTEST_FIELD_EQUALITY(t, u, i);\n> +\n> +\n> +\t\t/* Test vector of generated structs */\n> +\t\tstd::vector<ipa::test::TestStruct> v = { t, u };\n> +\t\tstd::vector<ipa::test::TestStruct> w;\n> +\n> +\t\tstd::tie(serialized, ignore) =\n> +\t\t\tIPADataSerializer<vector<ipa::test::TestStruct>>::serialize(v);\n> +\n> +\t\tw = IPADataSerializer<vector<ipa::test::TestStruct>>::deserialize(serialized);\n> +\n> +\t\tif (!equals(v[0].m, w[0].m) ||\n> +\t\t    !equals(v[1].m, w[1].m))\n> +\t\t\treturn TestFail;\n> +\n> +\t\tif (!equals(v[0].a, w[0].a) ||\n> +\t\t    !equals(v[1].a, w[1].a))\n> +\t\t\treturn TestFail;\n> +\n> +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s1);\n> +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s2);\n> +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s3);\n> +\t\tTEST_FIELD_EQUALITY(v[0], w[0], i);\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> +\n> +\t\treturn TestPass;\n> +\t}\n> +\n> +private:\n> +\tbool equals(const map<string, string> &lhs, const map<string, string> &rhs)\n> +\t{\n> +\t\tbool eq = lhs.size() == rhs.size() &&\n> +\t\t\t  equal(lhs.begin(), lhs.end(), rhs.begin(),\n> +\t\t\t\t[](auto &a, auto &b) { return a.first == b.first &&\n> +\t\t\t\t\t\t\t      a.second == b.second; });\n> +\n> +\t\tif (eq)\n> +\t\t\treturn true;\n> +\n> +\t\tcerr << \"lhs:\" << endl;\n> +\t\tfor (const auto &pair : lhs)\n> +\t\t\tcerr << \"- \" << pair.first << \": \"\n> +\t\t\t     << pair.second << endl;\n> +\n> +\t\tcerr << \"rhs:\" << endl;\n> +\t\tfor (const auto &pair : rhs)\n> +\t\t\tcerr << \"- \" << pair.first << \": \"\n> +\t\t\t     << pair.second << endl;\n> +\n> +\t\treturn false;\n> +\t}\n> +\n> +\tbool equals(const vector<string> &lhs, const vector<string> &rhs)\n> +\t{\n> +\t\tbool eq = lhs.size() == rhs.size();\n> +\n> +\t\tif (!eq) {\n> +\t\t\tcerr << \"sizes not equal\" << endl;\n> +\t\t\treturn false;\n> +\t\t}\n> +\n> +\t\tfor (unsigned int i = 0; i < lhs.size(); i++)\n> +\t\t\tif (lhs[i] != rhs[i])\n> +\t\t\t\teq = false;\n> +\n> +\t\tif (eq)\n> +\t\t\treturn true;\n> +\n> +\t\tcerr << \"lhs:\" << endl;\n> +\t\tfor (const auto &str : lhs)\n> +\t\t\tcerr << \"- \" << str << endl;\n> +\n> +\t\tcerr << \"rhs:\" << endl;\n> +\t\tfor (const auto &str : rhs)\n> +\t\t\tcerr << \"- \" << str << endl;\n> +\n> +\t\treturn false;\n> +\t}\n> +};\n> +\n> +TEST_REGISTER(IPAGeneratedSerializerTest)\n> diff --git a/test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h b/test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h\n> new file mode 100644\n> index 00000000..e69de29b\n\nDid you mean to add an empty test_ipa_interface.h ?\n\n> diff --git a/test/serialization/generated_serializer/meson.build b/test/serialization/generated_serializer/meson.build\n> new file mode 100644\n> index 00000000..aad6c4a1\n> --- /dev/null\n> +++ b/test/serialization/generated_serializer/meson.build\n> @@ -0,0 +1,52 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +# vimc.mojom-module\n> +mojom = custom_target('test_mojom_module',\n> +                      input : 'test.mojom',\n> +                      output : 'test.mojom-module',\n> +                      command : [\n> +                          mojom_parser,\n> +                          '--output-root', meson.build_root(),\n> +                          '--input-root', meson.source_root(),\n> +                          '--mojoms', '@INPUT@'\n> +                      ])\n> +\n> +# vimc_test_ipa_interface.h\n> +header = custom_target('test_ipa_interface_h',\n> +                       input : mojom,\n> +                       output : 'test_ipa_interface.h',\n> +                       depends : mojom_templates,\n> +                       command : [\n> +                           mojom_generator, 'generate',\n> +                           '-g', 'libcamera',\n> +                           '--bytecode_path', mojom_templates_dir,\n> +                           '--libcamera_generate_header',\n> +                           '--libcamera_output_path=@OUTPUT@',\n> +                           './' +'@INPUT@'\n> +                       ])\n> +\n> +# vimc_test_ipa_serializer.h\n> +serializer = custom_target('test_ipa_serializer_h',\n> +                           input : mojom,\n> +                           output : 'test_ipa_serializer.h',\n> +                           depends : mojom_templates,\n> +                           command : [\n> +                               mojom_generator, 'generate',\n> +                               '-g', 'libcamera',\n> +                               '--bytecode_path', mojom_templates_dir,\n> +                               '--libcamera_generate_serializer',\n> +                               '--libcamera_output_path=@OUTPUT@',\n> +                               './' +'@INPUT@'\n> +                           ])\n> +\n> +exe = executable('generated_serializer_test',\n> +                 ['generated_serializer_test.cpp', header, serializer],\n> +                 dependencies : libcamera_dep,\n> +                 link_with : test_libraries,\n> +                 include_directories : [\n> +                     test_includes_internal,\n> +                     './include',\n> +                 ])\n> +\n> +test('generated_serializer_test', exe,\n> +     suite : 'generated_serializer', is_parallel : false)\n> diff --git a/test/serialization/generated_serializer/test.mojom b/test/serialization/generated_serializer/test.mojom\n> new file mode 100644\n> index 00000000..2fd973e9\n> --- /dev/null\n> +++ b/test/serialization/generated_serializer/test.mojom\n> @@ -0,0 +1,33 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +\n> +module ipa.test;\n> +\n> +enum IPAOperationCode {\n> +\tIPAOperationNone,\n> +\tIPAOperationInit,\n> +\tIPAOperationStart,\n> +\tIPAOperationStop,\n> +};\n> +\n> +struct IPASettings {};\n> +\n> +struct TestStruct {\n> +\tmap<string, string> m;\n> +\tarray<string> a;\n> +\tstring s1;\n> +\tstring s2;\n> +\tint32 i;\n> +\tstring s3;\n> +};\n> +\n> +interface IPAVimcInterface {\n> +\tinit(IPASettings settings) => (int32 ret);\n> +\tstart() => (int32 ret);\n> +\tstop();\n> +\n> +\ttest(TestStruct s);\n> +};\n> +\n> +interface IPAVimcEventInterface {\n> +\tdummyEvent(uint32 val);\n> +};\n> diff --git a/test/serialization/meson.build b/test/serialization/meson.build\n> index a4636337..60ebf325 100644\n> --- a/test/serialization/meson.build\n> +++ b/test/serialization/meson.build\n> @@ -1,5 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n> +subdir('generated_serializer')\n> +\n>  serialization_tests = [\n>      ['control_serialization',     'control_serialization.cpp'],\n>      ['ipa_data_serializer_test',  'ipa_data_serializer_test.cpp'],","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 2462EBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Mar 2021 01:02:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A521060522;\n\tTue,  2 Mar 2021 02:02:06 +0100 (CET)","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 B4834602E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Mar 2021 02:02:04 +0100 (CET)","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 2623645D;\n\tTue,  2 Mar 2021 02:02:04 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QEujGtjW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1614646924;\n\tbh=m1p0dtgk19hJueh9J9AGPvrBfFygDoylWFZAMYNHgU8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QEujGtjWxA4tR0eqtlFOC7Y7Zbe8OuIxnBOKap3DcRAyKXIvR8xsQzvBRDh428JCg\n\tblRgXrbRr1KKGbyNXNHPqUaiGoPEpZdm95LUdO1ftrScJNza6lh0j+CJ6w2yryouam\n\t1rNIGdqWWdO6KSGMY5qvwUulswUNmsVnFNLI6LdM=","Date":"Tue, 2 Mar 2021 03:01:36 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YD2OcAUqkkic/W4L@pendragon.ideasonboard.com>","References":"<20210301065226.11095-1-paul.elder@ideasonboard.com>\n\t<20210301065226.11095-4-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210301065226.11095-4-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v9 3/3] tests: Test IPA serializer\n\tgeneration","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15382,"web_url":"https://patchwork.libcamera.org/comment/15382/","msgid":"<20210302011316.GL3084@pyrite.rasen.tech>","date":"2021-03-02T01:13:16","subject":"Re: [libcamera-devel] [PATCH v9 3/3] tests: Test IPA serializer\n\tgeneration","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Tue, Mar 02, 2021 at 03:01:36AM +0200, Laurent Pinchart wrote:\n> Hi Paul,\n> \n> Thank you for the patch.\n> \n> On Mon, Mar 01, 2021 at 03:52:26PM +0900, Paul Elder wrote:\n> > Add a test to confirm that serializer and header generation works\n> > properly for mojom definition files, and that the serializer works\n> > properly.\n> > \n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > ---\n> > Changes in v9:\n> > - rename everything vimc to test\n> > - add std:: to vectors and ties\n> > \n> > No change in v8\n> > \n> > Changes in v7:\n> > - add test to test serdes of a vector of *generated* structs\n> > \n> > Changes in v6:\n> > - use namespacing in the mojom file, and in the test\n> > - add the enum to the test mojom file, as vimc.h no longer exists\n> > \n> > Changes in v5:\n> > - add dummy event to event interface\n> > \n> > New in v4\n> > ---\n> >  .../generated_serializer_test.cpp             | 156 ++++++++++++++++++\n> >  .../libcamera/ipa/test_ipa_interface.h        |   0\n> >  .../generated_serializer/meson.build          |  52 ++++++\n> >  .../generated_serializer/test.mojom           |  33 ++++\n> >  test/serialization/meson.build                |   2 +\n> >  5 files changed, 243 insertions(+)\n> >  create mode 100644 test/serialization/generated_serializer/generated_serializer_test.cpp\n> >  create mode 100644 test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h\n> >  create mode 100644 test/serialization/generated_serializer/meson.build\n> >  create mode 100644 test/serialization/generated_serializer/test.mojom\n> > \n> > diff --git a/test/serialization/generated_serializer/generated_serializer_test.cpp b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> > new file mode 100644\n> > index 00000000..698c81d6\n> > --- /dev/null\n> > +++ b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> > @@ -0,0 +1,156 @@\n> > +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> > +/*\n> > + * Copyright (C) 2020, Google Inc.\n> > + *\n> > + * generated_serializer_test.cpp - Test generated serializer\n> > + */\n> > +\n> > +#include <algorithm>\n> > +#include <tuple>\n> > +#include <vector>\n> > +\n> > +#include \"test.h\"\n> > +\n> > +#include \"test_ipa_interface.h\"\n> > +#include \"test_ipa_serializer.h\"\n> > +\n> > +using namespace std;\n> > +using namespace libcamera;\n> > +\n> > +class IPAGeneratedSerializerTest : public Test\n> > +{\n> > +protected:\n> > +\tint init() override\n> > +\t{\n> > +\t\treturn TestPass;\n> > +\t}\n> > +\n> > +\tint run() override\n> > +\t{\n> > +\n> > +#define TEST_FIELD_EQUALITY(struct1, struct2, field)\t\t\\\n> > +if (struct1.field != struct2.field) {\t\t\t\t\\\n> > +\tcerr << #field << \" field incorrect: expected \\\"\"\t\\\n> > +\t     << t.field << \"\\\", got \\\"\" << u.field << \"\\\"\" << endl;\\\n> > +\treturn TestFail;\t\t\t\t\t\\\n> > +}\n> > +\n> > +\t\tipa::test::TestStruct t, u;\n> > +\n> > +\t\tt.m = {\n> > +\t\t\t{ \"a\", \"z\" },\n> > +\t\t\t{ \"b\", \"z\" },\n> > +\t\t\t{ \"c\", \"z\" },\n> > +\t\t\t{ \"d\", \"z\" },\n> > +\t\t\t{ \"e\", \"z\" },\n> > +\t\t};\n> > +\n> > +\t\tt.a = { \"a\", \"b\", \"c\", \"d\", \"e\" };\n> > +\n> > +\t\tt.s1 = \"hello world\";\n> > +\t\tt.s2 = \"goodbye\";\n> > +\t\tt.s3 = \"lorem ipsum\";\n> > +\t\tt.i  = 58527;\n> > +\n> > +\t\tstd::vector<uint8_t> serialized;\n> > +\n> > +\t\tstd::tie(serialized, ignore) =\n> > +\t\t\tIPADataSerializer<ipa::test::TestStruct>::serialize(t);\n> > +\n> > +\t\tu = IPADataSerializer<ipa::test::TestStruct>::deserialize(serialized);\n> > +\n> > +\t\tif (!equals(t.m, u.m))\n> > +\t\t\treturn TestFail;\n> > +\n> > +\t\tif (!equals(t.a, u.a))\n> > +\t\t\treturn TestFail;\n> > +\n> > +\t\tTEST_FIELD_EQUALITY(t, u, s1);\n> > +\t\tTEST_FIELD_EQUALITY(t, u, s2);\n> > +\t\tTEST_FIELD_EQUALITY(t, u, s3);\n> > +\t\tTEST_FIELD_EQUALITY(t, u, i);\n> > +\n> > +\n> > +\t\t/* Test vector of generated structs */\n> > +\t\tstd::vector<ipa::test::TestStruct> v = { t, u };\n> > +\t\tstd::vector<ipa::test::TestStruct> w;\n> > +\n> > +\t\tstd::tie(serialized, ignore) =\n> > +\t\t\tIPADataSerializer<vector<ipa::test::TestStruct>>::serialize(v);\n> > +\n> > +\t\tw = IPADataSerializer<vector<ipa::test::TestStruct>>::deserialize(serialized);\n> > +\n> > +\t\tif (!equals(v[0].m, w[0].m) ||\n> > +\t\t    !equals(v[1].m, w[1].m))\n> > +\t\t\treturn TestFail;\n> > +\n> > +\t\tif (!equals(v[0].a, w[0].a) ||\n> > +\t\t    !equals(v[1].a, w[1].a))\n> > +\t\t\treturn TestFail;\n> > +\n> > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s1);\n> > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s2);\n> > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s3);\n> > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], i);\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> > +\n> > +\t\treturn TestPass;\n> > +\t}\n> > +\n> > +private:\n> > +\tbool equals(const map<string, string> &lhs, const map<string, string> &rhs)\n> > +\t{\n> > +\t\tbool eq = lhs.size() == rhs.size() &&\n> > +\t\t\t  equal(lhs.begin(), lhs.end(), rhs.begin(),\n> > +\t\t\t\t[](auto &a, auto &b) { return a.first == b.first &&\n> > +\t\t\t\t\t\t\t      a.second == b.second; });\n> > +\n> > +\t\tif (eq)\n> > +\t\t\treturn true;\n> > +\n> > +\t\tcerr << \"lhs:\" << endl;\n> > +\t\tfor (const auto &pair : lhs)\n> > +\t\t\tcerr << \"- \" << pair.first << \": \"\n> > +\t\t\t     << pair.second << endl;\n> > +\n> > +\t\tcerr << \"rhs:\" << endl;\n> > +\t\tfor (const auto &pair : rhs)\n> > +\t\t\tcerr << \"- \" << pair.first << \": \"\n> > +\t\t\t     << pair.second << endl;\n> > +\n> > +\t\treturn false;\n> > +\t}\n> > +\n> > +\tbool equals(const vector<string> &lhs, const vector<string> &rhs)\n> > +\t{\n> > +\t\tbool eq = lhs.size() == rhs.size();\n> > +\n> > +\t\tif (!eq) {\n> > +\t\t\tcerr << \"sizes not equal\" << endl;\n> > +\t\t\treturn false;\n> > +\t\t}\n> > +\n> > +\t\tfor (unsigned int i = 0; i < lhs.size(); i++)\n> > +\t\t\tif (lhs[i] != rhs[i])\n> > +\t\t\t\teq = false;\n> > +\n> > +\t\tif (eq)\n> > +\t\t\treturn true;\n> > +\n> > +\t\tcerr << \"lhs:\" << endl;\n> > +\t\tfor (const auto &str : lhs)\n> > +\t\t\tcerr << \"- \" << str << endl;\n> > +\n> > +\t\tcerr << \"rhs:\" << endl;\n> > +\t\tfor (const auto &str : rhs)\n> > +\t\t\tcerr << \"- \" << str << endl;\n> > +\n> > +\t\treturn false;\n> > +\t}\n> > +};\n> > +\n> > +TEST_REGISTER(IPAGeneratedSerializerTest)\n> > diff --git a/test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h b/test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h\n> > new file mode 100644\n> > index 00000000..e69de29b\n> \n> Did you mean to add an empty test_ipa_interface.h ?\n\nYes, I did.\n\nWe tell the generator to generate a test_ipa_serializer.h based on\ntest.mojom, but this generates #include\n<libcamera/test_ipa_interface.h>.\n\nAlthough, below I generate test_ipa_interface.h from test.mojom.\n\nMaybe it's better to mkdir -p\ntest/serialization/generated_serializer/include/libcamera/ipa and then\nput the mojom file and the meson generator there?\n\n> > diff --git a/test/serialization/generated_serializer/meson.build b/test/serialization/generated_serializer/meson.build\n> > new file mode 100644\n> > index 00000000..aad6c4a1\n> > --- /dev/null\n> > +++ b/test/serialization/generated_serializer/meson.build\n> > @@ -0,0 +1,52 @@\n> > +# SPDX-License-Identifier: CC0-1.0\n> > +\n> > +# vimc.mojom-module\n\nOh I need to s/vimc/test here and below.\n\n> > +mojom = custom_target('test_mojom_module',\n> > +                      input : 'test.mojom',\n> > +                      output : 'test.mojom-module',\n> > +                      command : [\n> > +                          mojom_parser,\n> > +                          '--output-root', meson.build_root(),\n> > +                          '--input-root', meson.source_root(),\n> > +                          '--mojoms', '@INPUT@'\n> > +                      ])\n> > +\n> > +# vimc_test_ipa_interface.h\n> > +header = custom_target('test_ipa_interface_h',\n> > +                       input : mojom,\n> > +                       output : 'test_ipa_interface.h',\n> > +                       depends : mojom_templates,\n> > +                       command : [\n> > +                           mojom_generator, 'generate',\n> > +                           '-g', 'libcamera',\n> > +                           '--bytecode_path', mojom_templates_dir,\n> > +                           '--libcamera_generate_header',\n> > +                           '--libcamera_output_path=@OUTPUT@',\n> > +                           './' +'@INPUT@'\n> > +                       ])\n> > +\n> > +# vimc_test_ipa_serializer.h\n> > +serializer = custom_target('test_ipa_serializer_h',\n> > +                           input : mojom,\n> > +                           output : 'test_ipa_serializer.h',\n> > +                           depends : mojom_templates,\n> > +                           command : [\n> > +                               mojom_generator, 'generate',\n> > +                               '-g', 'libcamera',\n> > +                               '--bytecode_path', mojom_templates_dir,\n> > +                               '--libcamera_generate_serializer',\n> > +                               '--libcamera_output_path=@OUTPUT@',\n> > +                               './' +'@INPUT@'\n> > +                           ])\n> > +\n> > +exe = executable('generated_serializer_test',\n> > +                 ['generated_serializer_test.cpp', header, serializer],\n> > +                 dependencies : libcamera_dep,\n> > +                 link_with : test_libraries,\n> > +                 include_directories : [\n> > +                     test_includes_internal,\n> > +                     './include',\n> > +                 ])\n> > +\n> > +test('generated_serializer_test', exe,\n> > +     suite : 'generated_serializer', is_parallel : false)\n> > diff --git a/test/serialization/generated_serializer/test.mojom b/test/serialization/generated_serializer/test.mojom\n> > new file mode 100644\n> > index 00000000..2fd973e9\n> > --- /dev/null\n> > +++ b/test/serialization/generated_serializer/test.mojom\n> > @@ -0,0 +1,33 @@\n> > +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> > +\n> > +module ipa.test;\n> > +\n> > +enum IPAOperationCode {\n> > +\tIPAOperationNone,\n> > +\tIPAOperationInit,\n> > +\tIPAOperationStart,\n> > +\tIPAOperationStop,\n> > +};\n> > +\n> > +struct IPASettings {};\n> > +\n> > +struct TestStruct {\n> > +\tmap<string, string> m;\n> > +\tarray<string> a;\n> > +\tstring s1;\n> > +\tstring s2;\n> > +\tint32 i;\n> > +\tstring s3;\n> > +};\n> > +\n> > +interface IPAVimcInterface {\n> > +\tinit(IPASettings settings) => (int32 ret);\n> > +\tstart() => (int32 ret);\n> > +\tstop();\n> > +\n> > +\ttest(TestStruct s);\n> > +};\n\nOh I forgot to s/Vimc/Test here and below too.\n\n\nPaul\n\n> > +\n> > +interface IPAVimcEventInterface {\n> > +\tdummyEvent(uint32 val);\n> > +};\n> > diff --git a/test/serialization/meson.build b/test/serialization/meson.build\n> > index a4636337..60ebf325 100644\n> > --- a/test/serialization/meson.build\n> > +++ b/test/serialization/meson.build\n> > @@ -1,5 +1,7 @@\n> >  # SPDX-License-Identifier: CC0-1.0\n> >  \n> > +subdir('generated_serializer')\n> > +\n> >  serialization_tests = [\n> >      ['control_serialization',     'control_serialization.cpp'],\n> >      ['ipa_data_serializer_test',  'ipa_data_serializer_test.cpp'],","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 E3A39BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Mar 2021 01:13:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD13368A8F;\n\tTue,  2 Mar 2021 02:13:24 +0100 (CET)","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 71840602E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Mar 2021 02:13:23 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F368145D;\n\tTue,  2 Mar 2021 02:13:21 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"pDzR9qZc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1614647603;\n\tbh=MpWr8+qS5yFMReJQCcdJfPzc0nEJ1pNl8uUer2Zi/m8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pDzR9qZcwykrmlf6lNMEEINB880VlSQjvYxh9o4VnsUknHvCghirHhED7jrBmn7Gd\n\tC8Wvrw1+61cxHbtEbXNirTjDWQKlhgRNvJi70/AdVvyNQMRa8oYirWdTlYgK+rwb0j\n\tYf0BMwAWuGnDPd+UBbPSrKY4kykjNTxBVgqzMrd0=","Date":"Tue, 2 Mar 2021 10:13:16 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210302011316.GL3084@pyrite.rasen.tech>","References":"<20210301065226.11095-1-paul.elder@ideasonboard.com>\n\t<20210301065226.11095-4-paul.elder@ideasonboard.com>\n\t<YD2OcAUqkkic/W4L@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YD2OcAUqkkic/W4L@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v9 3/3] tests: Test IPA serializer\n\tgeneration","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15383,"web_url":"https://patchwork.libcamera.org/comment/15383/","msgid":"<YD2SdY2VWuqAMBFq@pendragon.ideasonboard.com>","date":"2021-03-02T01:18:45","subject":"Re: [libcamera-devel] [PATCH v9 3/3] tests: Test IPA serializer\n\tgeneration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nOn Tue, Mar 02, 2021 at 10:13:16AM +0900, paul.elder@ideasonboard.com wrote:\n> On Tue, Mar 02, 2021 at 03:01:36AM +0200, Laurent Pinchart wrote:\n> > On Mon, Mar 01, 2021 at 03:52:26PM +0900, Paul Elder wrote:\n> > > Add a test to confirm that serializer and header generation works\n> > > properly for mojom definition files, and that the serializer works\n> > > properly.\n> > > \n> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > \n> > > ---\n> > > Changes in v9:\n> > > - rename everything vimc to test\n> > > - add std:: to vectors and ties\n> > > \n> > > No change in v8\n> > > \n> > > Changes in v7:\n> > > - add test to test serdes of a vector of *generated* structs\n> > > \n> > > Changes in v6:\n> > > - use namespacing in the mojom file, and in the test\n> > > - add the enum to the test mojom file, as vimc.h no longer exists\n> > > \n> > > Changes in v5:\n> > > - add dummy event to event interface\n> > > \n> > > New in v4\n> > > ---\n> > >  .../generated_serializer_test.cpp             | 156 ++++++++++++++++++\n> > >  .../libcamera/ipa/test_ipa_interface.h        |   0\n> > >  .../generated_serializer/meson.build          |  52 ++++++\n> > >  .../generated_serializer/test.mojom           |  33 ++++\n> > >  test/serialization/meson.build                |   2 +\n> > >  5 files changed, 243 insertions(+)\n> > >  create mode 100644 test/serialization/generated_serializer/generated_serializer_test.cpp\n> > >  create mode 100644 test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h\n> > >  create mode 100644 test/serialization/generated_serializer/meson.build\n> > >  create mode 100644 test/serialization/generated_serializer/test.mojom\n> > > \n> > > diff --git a/test/serialization/generated_serializer/generated_serializer_test.cpp b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> > > new file mode 100644\n> > > index 00000000..698c81d6\n> > > --- /dev/null\n> > > +++ b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> > > @@ -0,0 +1,156 @@\n> > > +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> > > +/*\n> > > + * Copyright (C) 2020, Google Inc.\n> > > + *\n> > > + * generated_serializer_test.cpp - Test generated serializer\n> > > + */\n> > > +\n> > > +#include <algorithm>\n> > > +#include <tuple>\n> > > +#include <vector>\n> > > +\n> > > +#include \"test.h\"\n> > > +\n> > > +#include \"test_ipa_interface.h\"\n> > > +#include \"test_ipa_serializer.h\"\n> > > +\n> > > +using namespace std;\n> > > +using namespace libcamera;\n> > > +\n> > > +class IPAGeneratedSerializerTest : public Test\n> > > +{\n> > > +protected:\n> > > +\tint init() override\n> > > +\t{\n> > > +\t\treturn TestPass;\n> > > +\t}\n> > > +\n> > > +\tint run() override\n> > > +\t{\n> > > +\n> > > +#define TEST_FIELD_EQUALITY(struct1, struct2, field)\t\t\\\n> > > +if (struct1.field != struct2.field) {\t\t\t\t\\\n> > > +\tcerr << #field << \" field incorrect: expected \\\"\"\t\\\n> > > +\t     << t.field << \"\\\", got \\\"\" << u.field << \"\\\"\" << endl;\\\n> > > +\treturn TestFail;\t\t\t\t\t\\\n> > > +}\n> > > +\n> > > +\t\tipa::test::TestStruct t, u;\n> > > +\n> > > +\t\tt.m = {\n> > > +\t\t\t{ \"a\", \"z\" },\n> > > +\t\t\t{ \"b\", \"z\" },\n> > > +\t\t\t{ \"c\", \"z\" },\n> > > +\t\t\t{ \"d\", \"z\" },\n> > > +\t\t\t{ \"e\", \"z\" },\n> > > +\t\t};\n> > > +\n> > > +\t\tt.a = { \"a\", \"b\", \"c\", \"d\", \"e\" };\n> > > +\n> > > +\t\tt.s1 = \"hello world\";\n> > > +\t\tt.s2 = \"goodbye\";\n> > > +\t\tt.s3 = \"lorem ipsum\";\n> > > +\t\tt.i  = 58527;\n> > > +\n> > > +\t\tstd::vector<uint8_t> serialized;\n> > > +\n> > > +\t\tstd::tie(serialized, ignore) =\n> > > +\t\t\tIPADataSerializer<ipa::test::TestStruct>::serialize(t);\n> > > +\n> > > +\t\tu = IPADataSerializer<ipa::test::TestStruct>::deserialize(serialized);\n> > > +\n> > > +\t\tif (!equals(t.m, u.m))\n> > > +\t\t\treturn TestFail;\n> > > +\n> > > +\t\tif (!equals(t.a, u.a))\n> > > +\t\t\treturn TestFail;\n> > > +\n> > > +\t\tTEST_FIELD_EQUALITY(t, u, s1);\n> > > +\t\tTEST_FIELD_EQUALITY(t, u, s2);\n> > > +\t\tTEST_FIELD_EQUALITY(t, u, s3);\n> > > +\t\tTEST_FIELD_EQUALITY(t, u, i);\n> > > +\n> > > +\n> > > +\t\t/* Test vector of generated structs */\n> > > +\t\tstd::vector<ipa::test::TestStruct> v = { t, u };\n> > > +\t\tstd::vector<ipa::test::TestStruct> w;\n> > > +\n> > > +\t\tstd::tie(serialized, ignore) =\n> > > +\t\t\tIPADataSerializer<vector<ipa::test::TestStruct>>::serialize(v);\n> > > +\n> > > +\t\tw = IPADataSerializer<vector<ipa::test::TestStruct>>::deserialize(serialized);\n> > > +\n> > > +\t\tif (!equals(v[0].m, w[0].m) ||\n> > > +\t\t    !equals(v[1].m, w[1].m))\n> > > +\t\t\treturn TestFail;\n> > > +\n> > > +\t\tif (!equals(v[0].a, w[0].a) ||\n> > > +\t\t    !equals(v[1].a, w[1].a))\n> > > +\t\t\treturn TestFail;\n> > > +\n> > > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s1);\n> > > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s2);\n> > > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s3);\n> > > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], i);\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> > > +\n> > > +\t\treturn TestPass;\n> > > +\t}\n> > > +\n> > > +private:\n> > > +\tbool equals(const map<string, string> &lhs, const map<string, string> &rhs)\n> > > +\t{\n> > > +\t\tbool eq = lhs.size() == rhs.size() &&\n> > > +\t\t\t  equal(lhs.begin(), lhs.end(), rhs.begin(),\n> > > +\t\t\t\t[](auto &a, auto &b) { return a.first == b.first &&\n> > > +\t\t\t\t\t\t\t      a.second == b.second; });\n> > > +\n> > > +\t\tif (eq)\n> > > +\t\t\treturn true;\n> > > +\n> > > +\t\tcerr << \"lhs:\" << endl;\n> > > +\t\tfor (const auto &pair : lhs)\n> > > +\t\t\tcerr << \"- \" << pair.first << \": \"\n> > > +\t\t\t     << pair.second << endl;\n> > > +\n> > > +\t\tcerr << \"rhs:\" << endl;\n> > > +\t\tfor (const auto &pair : rhs)\n> > > +\t\t\tcerr << \"- \" << pair.first << \": \"\n> > > +\t\t\t     << pair.second << endl;\n> > > +\n> > > +\t\treturn false;\n> > > +\t}\n> > > +\n> > > +\tbool equals(const vector<string> &lhs, const vector<string> &rhs)\n> > > +\t{\n> > > +\t\tbool eq = lhs.size() == rhs.size();\n> > > +\n> > > +\t\tif (!eq) {\n> > > +\t\t\tcerr << \"sizes not equal\" << endl;\n> > > +\t\t\treturn false;\n> > > +\t\t}\n> > > +\n> > > +\t\tfor (unsigned int i = 0; i < lhs.size(); i++)\n> > > +\t\t\tif (lhs[i] != rhs[i])\n> > > +\t\t\t\teq = false;\n> > > +\n> > > +\t\tif (eq)\n> > > +\t\t\treturn true;\n> > > +\n> > > +\t\tcerr << \"lhs:\" << endl;\n> > > +\t\tfor (const auto &str : lhs)\n> > > +\t\t\tcerr << \"- \" << str << endl;\n> > > +\n> > > +\t\tcerr << \"rhs:\" << endl;\n> > > +\t\tfor (const auto &str : rhs)\n> > > +\t\t\tcerr << \"- \" << str << endl;\n> > > +\n> > > +\t\treturn false;\n> > > +\t}\n> > > +};\n> > > +\n> > > +TEST_REGISTER(IPAGeneratedSerializerTest)\n> > > diff --git a/test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h b/test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h\n> > > new file mode 100644\n> > > index 00000000..e69de29b\n> > \n> > Did you mean to add an empty test_ipa_interface.h ?\n> \n> Yes, I did.\n> \n> We tell the generator to generate a test_ipa_serializer.h based on\n> test.mojom, but this generates #include\n> <libcamera/test_ipa_interface.h>.\n\nAh good point.\n\n> Although, below I generate test_ipa_interface.h from test.mojom.\n> \n> Maybe it's better to mkdir -p\n> test/serialization/generated_serializer/include/libcamera/ipa and then\n> put the mojom file and the meson generator there?\n\nIf it's easy, sure. Otherwise, the empty header is fine, with a comment\nin the file to explain what it's for.\n\n> > > diff --git a/test/serialization/generated_serializer/meson.build b/test/serialization/generated_serializer/meson.build\n> > > new file mode 100644\n> > > index 00000000..aad6c4a1\n> > > --- /dev/null\n> > > +++ b/test/serialization/generated_serializer/meson.build\n> > > @@ -0,0 +1,52 @@\n> > > +# SPDX-License-Identifier: CC0-1.0\n> > > +\n> > > +# vimc.mojom-module\n> \n> Oh I need to s/vimc/test here and below.\n> \n> > > +mojom = custom_target('test_mojom_module',\n> > > +                      input : 'test.mojom',\n> > > +                      output : 'test.mojom-module',\n> > > +                      command : [\n> > > +                          mojom_parser,\n> > > +                          '--output-root', meson.build_root(),\n> > > +                          '--input-root', meson.source_root(),\n> > > +                          '--mojoms', '@INPUT@'\n> > > +                      ])\n> > > +\n> > > +# vimc_test_ipa_interface.h\n> > > +header = custom_target('test_ipa_interface_h',\n> > > +                       input : mojom,\n> > > +                       output : 'test_ipa_interface.h',\n> > > +                       depends : mojom_templates,\n> > > +                       command : [\n> > > +                           mojom_generator, 'generate',\n> > > +                           '-g', 'libcamera',\n> > > +                           '--bytecode_path', mojom_templates_dir,\n> > > +                           '--libcamera_generate_header',\n> > > +                           '--libcamera_output_path=@OUTPUT@',\n> > > +                           './' +'@INPUT@'\n> > > +                       ])\n> > > +\n> > > +# vimc_test_ipa_serializer.h\n> > > +serializer = custom_target('test_ipa_serializer_h',\n> > > +                           input : mojom,\n> > > +                           output : 'test_ipa_serializer.h',\n> > > +                           depends : mojom_templates,\n> > > +                           command : [\n> > > +                               mojom_generator, 'generate',\n> > > +                               '-g', 'libcamera',\n> > > +                               '--bytecode_path', mojom_templates_dir,\n> > > +                               '--libcamera_generate_serializer',\n> > > +                               '--libcamera_output_path=@OUTPUT@',\n> > > +                               './' +'@INPUT@'\n> > > +                           ])\n> > > +\n> > > +exe = executable('generated_serializer_test',\n> > > +                 ['generated_serializer_test.cpp', header, serializer],\n> > > +                 dependencies : libcamera_dep,\n> > > +                 link_with : test_libraries,\n> > > +                 include_directories : [\n> > > +                     test_includes_internal,\n> > > +                     './include',\n> > > +                 ])\n> > > +\n> > > +test('generated_serializer_test', exe,\n> > > +     suite : 'generated_serializer', is_parallel : false)\n> > > diff --git a/test/serialization/generated_serializer/test.mojom b/test/serialization/generated_serializer/test.mojom\n> > > new file mode 100644\n> > > index 00000000..2fd973e9\n> > > --- /dev/null\n> > > +++ b/test/serialization/generated_serializer/test.mojom\n> > > @@ -0,0 +1,33 @@\n> > > +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> > > +\n> > > +module ipa.test;\n> > > +\n> > > +enum IPAOperationCode {\n> > > +\tIPAOperationNone,\n> > > +\tIPAOperationInit,\n> > > +\tIPAOperationStart,\n> > > +\tIPAOperationStop,\n> > > +};\n> > > +\n> > > +struct IPASettings {};\n> > > +\n> > > +struct TestStruct {\n> > > +\tmap<string, string> m;\n> > > +\tarray<string> a;\n> > > +\tstring s1;\n> > > +\tstring s2;\n> > > +\tint32 i;\n> > > +\tstring s3;\n> > > +};\n> > > +\n> > > +interface IPAVimcInterface {\n> > > +\tinit(IPASettings settings) => (int32 ret);\n> > > +\tstart() => (int32 ret);\n> > > +\tstop();\n> > > +\n> > > +\ttest(TestStruct s);\n> > > +};\n> \n> Oh I forgot to s/Vimc/Test here and below too.\n> \n> > > +\n> > > +interface IPAVimcEventInterface {\n> > > +\tdummyEvent(uint32 val);\n> > > +};\n> > > diff --git a/test/serialization/meson.build b/test/serialization/meson.build\n> > > index a4636337..60ebf325 100644\n> > > --- a/test/serialization/meson.build\n> > > +++ b/test/serialization/meson.build\n> > > @@ -1,5 +1,7 @@\n> > >  # SPDX-License-Identifier: CC0-1.0\n> > >  \n> > > +subdir('generated_serializer')\n> > > +\n> > >  serialization_tests = [\n> > >      ['control_serialization',     'control_serialization.cpp'],\n> > >      ['ipa_data_serializer_test',  'ipa_data_serializer_test.cpp'],","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 05DDEBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Mar 2021 01:19:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8331168A8F;\n\tTue,  2 Mar 2021 02:19:15 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E6E4D602E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Mar 2021 02:19:13 +0100 (CET)","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 4BF3945D;\n\tTue,  2 Mar 2021 02:19:13 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"pZZANGbN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1614647953;\n\tbh=vq6295tzPhF27Q9/pmqvi+9oM2e8wcpjMrdC993Vp8M=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pZZANGbNNoCvXxE7R+q0oVhB5IkBIAkXLI5SWA2QsLoKgW9RT1e8tpz/XTD0U4On+\n\t8o7wafCpnU/ZALF3rHT1JqbiG5NXcKbXOSooONKJcjZXKSNrJi/u8Fnw/9MRi/aR6f\n\ttKBdDBU0u1u0XcevlB2X6jNJ8NNeTExZBEs3XlEM=","Date":"Tue, 2 Mar 2021 03:18:45 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"paul.elder@ideasonboard.com","Message-ID":"<YD2SdY2VWuqAMBFq@pendragon.ideasonboard.com>","References":"<20210301065226.11095-1-paul.elder@ideasonboard.com>\n\t<20210301065226.11095-4-paul.elder@ideasonboard.com>\n\t<YD2OcAUqkkic/W4L@pendragon.ideasonboard.com>\n\t<20210302011316.GL3084@pyrite.rasen.tech>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210302011316.GL3084@pyrite.rasen.tech>","Subject":"Re: [libcamera-devel] [PATCH v9 3/3] tests: Test IPA serializer\n\tgeneration","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15385,"web_url":"https://patchwork.libcamera.org/comment/15385/","msgid":"<20210302012537.GN3084@pyrite.rasen.tech>","date":"2021-03-02T01:25:37","subject":"Re: [libcamera-devel] [PATCH v9 3/3] tests: Test IPA serializer\n\tgeneration","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Tue, Mar 02, 2021 at 03:18:45AM +0200, Laurent Pinchart wrote:\n> Hi Paul,\n> \n> On Tue, Mar 02, 2021 at 10:13:16AM +0900, paul.elder@ideasonboard.com wrote:\n> > On Tue, Mar 02, 2021 at 03:01:36AM +0200, Laurent Pinchart wrote:\n> > > On Mon, Mar 01, 2021 at 03:52:26PM +0900, Paul Elder wrote:\n> > > > Add a test to confirm that serializer and header generation works\n> > > > properly for mojom definition files, and that the serializer works\n> > > > properly.\n> > > > \n> > > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > \n> > > > ---\n> > > > Changes in v9:\n> > > > - rename everything vimc to test\n> > > > - add std:: to vectors and ties\n> > > > \n> > > > No change in v8\n> > > > \n> > > > Changes in v7:\n> > > > - add test to test serdes of a vector of *generated* structs\n> > > > \n> > > > Changes in v6:\n> > > > - use namespacing in the mojom file, and in the test\n> > > > - add the enum to the test mojom file, as vimc.h no longer exists\n> > > > \n> > > > Changes in v5:\n> > > > - add dummy event to event interface\n> > > > \n> > > > New in v4\n> > > > ---\n> > > >  .../generated_serializer_test.cpp             | 156 ++++++++++++++++++\n> > > >  .../libcamera/ipa/test_ipa_interface.h        |   0\n> > > >  .../generated_serializer/meson.build          |  52 ++++++\n> > > >  .../generated_serializer/test.mojom           |  33 ++++\n> > > >  test/serialization/meson.build                |   2 +\n> > > >  5 files changed, 243 insertions(+)\n> > > >  create mode 100644 test/serialization/generated_serializer/generated_serializer_test.cpp\n> > > >  create mode 100644 test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h\n> > > >  create mode 100644 test/serialization/generated_serializer/meson.build\n> > > >  create mode 100644 test/serialization/generated_serializer/test.mojom\n> > > > \n> > > > diff --git a/test/serialization/generated_serializer/generated_serializer_test.cpp b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> > > > new file mode 100644\n> > > > index 00000000..698c81d6\n> > > > --- /dev/null\n> > > > +++ b/test/serialization/generated_serializer/generated_serializer_test.cpp\n> > > > @@ -0,0 +1,156 @@\n> > > > +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> > > > +/*\n> > > > + * Copyright (C) 2020, Google Inc.\n> > > > + *\n> > > > + * generated_serializer_test.cpp - Test generated serializer\n> > > > + */\n> > > > +\n> > > > +#include <algorithm>\n> > > > +#include <tuple>\n> > > > +#include <vector>\n> > > > +\n> > > > +#include \"test.h\"\n> > > > +\n> > > > +#include \"test_ipa_interface.h\"\n> > > > +#include \"test_ipa_serializer.h\"\n> > > > +\n> > > > +using namespace std;\n> > > > +using namespace libcamera;\n> > > > +\n> > > > +class IPAGeneratedSerializerTest : public Test\n> > > > +{\n> > > > +protected:\n> > > > +\tint init() override\n> > > > +\t{\n> > > > +\t\treturn TestPass;\n> > > > +\t}\n> > > > +\n> > > > +\tint run() override\n> > > > +\t{\n> > > > +\n> > > > +#define TEST_FIELD_EQUALITY(struct1, struct2, field)\t\t\\\n> > > > +if (struct1.field != struct2.field) {\t\t\t\t\\\n> > > > +\tcerr << #field << \" field incorrect: expected \\\"\"\t\\\n> > > > +\t     << t.field << \"\\\", got \\\"\" << u.field << \"\\\"\" << endl;\\\n> > > > +\treturn TestFail;\t\t\t\t\t\\\n> > > > +}\n> > > > +\n> > > > +\t\tipa::test::TestStruct t, u;\n> > > > +\n> > > > +\t\tt.m = {\n> > > > +\t\t\t{ \"a\", \"z\" },\n> > > > +\t\t\t{ \"b\", \"z\" },\n> > > > +\t\t\t{ \"c\", \"z\" },\n> > > > +\t\t\t{ \"d\", \"z\" },\n> > > > +\t\t\t{ \"e\", \"z\" },\n> > > > +\t\t};\n> > > > +\n> > > > +\t\tt.a = { \"a\", \"b\", \"c\", \"d\", \"e\" };\n> > > > +\n> > > > +\t\tt.s1 = \"hello world\";\n> > > > +\t\tt.s2 = \"goodbye\";\n> > > > +\t\tt.s3 = \"lorem ipsum\";\n> > > > +\t\tt.i  = 58527;\n> > > > +\n> > > > +\t\tstd::vector<uint8_t> serialized;\n> > > > +\n> > > > +\t\tstd::tie(serialized, ignore) =\n> > > > +\t\t\tIPADataSerializer<ipa::test::TestStruct>::serialize(t);\n> > > > +\n> > > > +\t\tu = IPADataSerializer<ipa::test::TestStruct>::deserialize(serialized);\n> > > > +\n> > > > +\t\tif (!equals(t.m, u.m))\n> > > > +\t\t\treturn TestFail;\n> > > > +\n> > > > +\t\tif (!equals(t.a, u.a))\n> > > > +\t\t\treturn TestFail;\n> > > > +\n> > > > +\t\tTEST_FIELD_EQUALITY(t, u, s1);\n> > > > +\t\tTEST_FIELD_EQUALITY(t, u, s2);\n> > > > +\t\tTEST_FIELD_EQUALITY(t, u, s3);\n> > > > +\t\tTEST_FIELD_EQUALITY(t, u, i);\n> > > > +\n> > > > +\n> > > > +\t\t/* Test vector of generated structs */\n> > > > +\t\tstd::vector<ipa::test::TestStruct> v = { t, u };\n> > > > +\t\tstd::vector<ipa::test::TestStruct> w;\n> > > > +\n> > > > +\t\tstd::tie(serialized, ignore) =\n> > > > +\t\t\tIPADataSerializer<vector<ipa::test::TestStruct>>::serialize(v);\n> > > > +\n> > > > +\t\tw = IPADataSerializer<vector<ipa::test::TestStruct>>::deserialize(serialized);\n> > > > +\n> > > > +\t\tif (!equals(v[0].m, w[0].m) ||\n> > > > +\t\t    !equals(v[1].m, w[1].m))\n> > > > +\t\t\treturn TestFail;\n> > > > +\n> > > > +\t\tif (!equals(v[0].a, w[0].a) ||\n> > > > +\t\t    !equals(v[1].a, w[1].a))\n> > > > +\t\t\treturn TestFail;\n> > > > +\n> > > > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s1);\n> > > > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s2);\n> > > > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], s3);\n> > > > +\t\tTEST_FIELD_EQUALITY(v[0], w[0], i);\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> > > > +\n> > > > +\t\treturn TestPass;\n> > > > +\t}\n> > > > +\n> > > > +private:\n> > > > +\tbool equals(const map<string, string> &lhs, const map<string, string> &rhs)\n> > > > +\t{\n> > > > +\t\tbool eq = lhs.size() == rhs.size() &&\n> > > > +\t\t\t  equal(lhs.begin(), lhs.end(), rhs.begin(),\n> > > > +\t\t\t\t[](auto &a, auto &b) { return a.first == b.first &&\n> > > > +\t\t\t\t\t\t\t      a.second == b.second; });\n> > > > +\n> > > > +\t\tif (eq)\n> > > > +\t\t\treturn true;\n> > > > +\n> > > > +\t\tcerr << \"lhs:\" << endl;\n> > > > +\t\tfor (const auto &pair : lhs)\n> > > > +\t\t\tcerr << \"- \" << pair.first << \": \"\n> > > > +\t\t\t     << pair.second << endl;\n> > > > +\n> > > > +\t\tcerr << \"rhs:\" << endl;\n> > > > +\t\tfor (const auto &pair : rhs)\n> > > > +\t\t\tcerr << \"- \" << pair.first << \": \"\n> > > > +\t\t\t     << pair.second << endl;\n> > > > +\n> > > > +\t\treturn false;\n> > > > +\t}\n> > > > +\n> > > > +\tbool equals(const vector<string> &lhs, const vector<string> &rhs)\n> > > > +\t{\n> > > > +\t\tbool eq = lhs.size() == rhs.size();\n> > > > +\n> > > > +\t\tif (!eq) {\n> > > > +\t\t\tcerr << \"sizes not equal\" << endl;\n> > > > +\t\t\treturn false;\n> > > > +\t\t}\n> > > > +\n> > > > +\t\tfor (unsigned int i = 0; i < lhs.size(); i++)\n> > > > +\t\t\tif (lhs[i] != rhs[i])\n> > > > +\t\t\t\teq = false;\n> > > > +\n> > > > +\t\tif (eq)\n> > > > +\t\t\treturn true;\n> > > > +\n> > > > +\t\tcerr << \"lhs:\" << endl;\n> > > > +\t\tfor (const auto &str : lhs)\n> > > > +\t\t\tcerr << \"- \" << str << endl;\n> > > > +\n> > > > +\t\tcerr << \"rhs:\" << endl;\n> > > > +\t\tfor (const auto &str : rhs)\n> > > > +\t\t\tcerr << \"- \" << str << endl;\n> > > > +\n> > > > +\t\treturn false;\n> > > > +\t}\n> > > > +};\n> > > > +\n> > > > +TEST_REGISTER(IPAGeneratedSerializerTest)\n> > > > diff --git a/test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h b/test/serialization/generated_serializer/include/libcamera/ipa/test_ipa_interface.h\n> > > > new file mode 100644\n> > > > index 00000000..e69de29b\n> > > \n> > > Did you mean to add an empty test_ipa_interface.h ?\n> > \n> > Yes, I did.\n> > \n> > We tell the generator to generate a test_ipa_serializer.h based on\n> > test.mojom, but this generates #include\n> > <libcamera/test_ipa_interface.h>.\n> \n> Ah good point.\n> \n> > Although, below I generate test_ipa_interface.h from test.mojom.\n> > \n> > Maybe it's better to mkdir -p\n> > test/serialization/generated_serializer/include/libcamera/ipa and then\n> > put the mojom file and the meson generator there?\n> \n> If it's easy, sure. Otherwise, the empty header is fine, with a comment\n> in the file to explain what it's for.\n\nHold on, the generated header contains the definition of the TestStruct,\nthat's why we need it ...how did the tests work before then?\n\nI'll move the mojom file and meson generator into the subdir.\n\n\nPaul\n\n> > > > diff --git a/test/serialization/generated_serializer/meson.build b/test/serialization/generated_serializer/meson.build\n> > > > new file mode 100644\n> > > > index 00000000..aad6c4a1\n> > > > --- /dev/null\n> > > > +++ b/test/serialization/generated_serializer/meson.build\n> > > > @@ -0,0 +1,52 @@\n> > > > +# SPDX-License-Identifier: CC0-1.0\n> > > > +\n> > > > +# vimc.mojom-module\n> > \n> > Oh I need to s/vimc/test here and below.\n> > \n> > > > +mojom = custom_target('test_mojom_module',\n> > > > +                      input : 'test.mojom',\n> > > > +                      output : 'test.mojom-module',\n> > > > +                      command : [\n> > > > +                          mojom_parser,\n> > > > +                          '--output-root', meson.build_root(),\n> > > > +                          '--input-root', meson.source_root(),\n> > > > +                          '--mojoms', '@INPUT@'\n> > > > +                      ])\n> > > > +\n> > > > +# vimc_test_ipa_interface.h\n> > > > +header = custom_target('test_ipa_interface_h',\n> > > > +                       input : mojom,\n> > > > +                       output : 'test_ipa_interface.h',\n> > > > +                       depends : mojom_templates,\n> > > > +                       command : [\n> > > > +                           mojom_generator, 'generate',\n> > > > +                           '-g', 'libcamera',\n> > > > +                           '--bytecode_path', mojom_templates_dir,\n> > > > +                           '--libcamera_generate_header',\n> > > > +                           '--libcamera_output_path=@OUTPUT@',\n> > > > +                           './' +'@INPUT@'\n> > > > +                       ])\n> > > > +\n> > > > +# vimc_test_ipa_serializer.h\n> > > > +serializer = custom_target('test_ipa_serializer_h',\n> > > > +                           input : mojom,\n> > > > +                           output : 'test_ipa_serializer.h',\n> > > > +                           depends : mojom_templates,\n> > > > +                           command : [\n> > > > +                               mojom_generator, 'generate',\n> > > > +                               '-g', 'libcamera',\n> > > > +                               '--bytecode_path', mojom_templates_dir,\n> > > > +                               '--libcamera_generate_serializer',\n> > > > +                               '--libcamera_output_path=@OUTPUT@',\n> > > > +                               './' +'@INPUT@'\n> > > > +                           ])\n> > > > +\n> > > > +exe = executable('generated_serializer_test',\n> > > > +                 ['generated_serializer_test.cpp', header, serializer],\n> > > > +                 dependencies : libcamera_dep,\n> > > > +                 link_with : test_libraries,\n> > > > +                 include_directories : [\n> > > > +                     test_includes_internal,\n> > > > +                     './include',\n> > > > +                 ])\n> > > > +\n> > > > +test('generated_serializer_test', exe,\n> > > > +     suite : 'generated_serializer', is_parallel : false)\n> > > > diff --git a/test/serialization/generated_serializer/test.mojom b/test/serialization/generated_serializer/test.mojom\n> > > > new file mode 100644\n> > > > index 00000000..2fd973e9\n> > > > --- /dev/null\n> > > > +++ b/test/serialization/generated_serializer/test.mojom\n> > > > @@ -0,0 +1,33 @@\n> > > > +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> > > > +\n> > > > +module ipa.test;\n> > > > +\n> > > > +enum IPAOperationCode {\n> > > > +\tIPAOperationNone,\n> > > > +\tIPAOperationInit,\n> > > > +\tIPAOperationStart,\n> > > > +\tIPAOperationStop,\n> > > > +};\n> > > > +\n> > > > +struct IPASettings {};\n> > > > +\n> > > > +struct TestStruct {\n> > > > +\tmap<string, string> m;\n> > > > +\tarray<string> a;\n> > > > +\tstring s1;\n> > > > +\tstring s2;\n> > > > +\tint32 i;\n> > > > +\tstring s3;\n> > > > +};\n> > > > +\n> > > > +interface IPAVimcInterface {\n> > > > +\tinit(IPASettings settings) => (int32 ret);\n> > > > +\tstart() => (int32 ret);\n> > > > +\tstop();\n> > > > +\n> > > > +\ttest(TestStruct s);\n> > > > +};\n> > \n> > Oh I forgot to s/Vimc/Test here and below too.\n> > \n> > > > +\n> > > > +interface IPAVimcEventInterface {\n> > > > +\tdummyEvent(uint32 val);\n> > > > +};\n> > > > diff --git a/test/serialization/meson.build b/test/serialization/meson.build\n> > > > index a4636337..60ebf325 100644\n> > > > --- a/test/serialization/meson.build\n> > > > +++ b/test/serialization/meson.build\n> > > > @@ -1,5 +1,7 @@\n> > > >  # SPDX-License-Identifier: CC0-1.0\n> > > >  \n> > > > +subdir('generated_serializer')\n> > > > +\n> > > >  serialization_tests = [\n> > > >      ['control_serialization',     'control_serialization.cpp'],\n> > > >      ['ipa_data_serializer_test',  'ipa_data_serializer_test.cpp'],","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 57B50BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Mar 2021 01:25:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D81F868A8F;\n\tTue,  2 Mar 2021 02:25:45 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 85575602E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Mar 2021 02:25:44 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DB42045D;\n\tTue,  2 Mar 2021 02:25:42 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"oW7iukSy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1614648344;\n\tbh=FlCjN+uoEmoNmrvt/kc63uXjJBXCDCb6heE8SK6ZkFU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oW7iukSyOgWLzdl7wlyEFRWbJXyhBqeJyKQp5jz4VUIpIcaGeyrZkFfRVMwkaP2bj\n\tDnvXh/7GDKWMeChJcAOFGd8SoD8pCNLUNT292jrJmpuMC+Wb96adNYa+/jcf5D0j6b\n\t5ccB9pV7ktyWqnRVGAmKV+15qte9QJSgylx9i96E=","Date":"Tue, 2 Mar 2021 10:25:37 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210302012537.GN3084@pyrite.rasen.tech>","References":"<20210301065226.11095-1-paul.elder@ideasonboard.com>\n\t<20210301065226.11095-4-paul.elder@ideasonboard.com>\n\t<YD2OcAUqkkic/W4L@pendragon.ideasonboard.com>\n\t<20210302011316.GL3084@pyrite.rasen.tech>\n\t<YD2SdY2VWuqAMBFq@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YD2SdY2VWuqAMBFq@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v9 3/3] tests: Test IPA serializer\n\tgeneration","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]